Hello all. I made a simple alpha function (rgba) which will make an alpha based color.
function rgba(r,g,b,a)
c = (a and 0xff) << 24 or ((r and 0xff) << 16) or ((g and 0xff) << 8) or (b and 0xff)
endfunction c
And here's an example using that:
sync on
iCurrent = 0
x = 0
y = 0
r = 0
g = 0
b = 0
szBuff$ = ""
do
szBuff$ = str$(iCurrent)
x = rnd(640)
y = rnd(480)
r = rnd(0xff)
g = rnd(0xff)
b = rnd(0xff)
inc iCurrent
box 0, 0, 640, 480, 0x01000000, 0x01000000, 0x01000000, 0x01000000
ink rgba(r,g,b,0x77), 0
text x, y, szBuff$
ink rgb(r,g,b), 0
text x-2,y-2,szBuff$
sync
loop
function rgba(r,g,b,a)
c = (a and 0xff) << 24 or ((r and 0xff) << 16) or ((g and 0xff) << 8) or (b and 0xff)
endfunction c
Cheers,
-naota