Notifications
Clear all
[Closed] can not draw alpha color?
Jun 24, 2010 4:33 am
GC()
FreeSceneBitmaps()
UnDisplay theCanvas
CanvasWidth = 160
CanvasHeight = 120
theCanvas = bitmap CanvasWidth CanvasHeight color:white
procCanvas = copy theCanvas
Display theCanvas
for PosY = 0.0 to CanvasHeight - 1 do
for PosX = 0.0 to CanvasWidth - 1 do
(
R = (PosX / CanvasWidth) * 255
G = (PosY / CanvasHeight) * 255
B = 100
A = 10
SetPixels procCanvas [PosX,PosY] #((color R G B A))
)
Display theCanvas
thanks
3 Replies
Jun 24, 2010 4:33 am
thnaks for your reply
but
GC()
FreeSceneBitmaps()
UnDisplay theCanvas
CanvasWidth = 160
CanvasHeight = 120
theCanvas = bitmap CanvasWidth CanvasHeight color:white
procCanvas = copy theCanvas
Display theCanvas
for PosY = 0.0 to CanvasHeight – 1 do
for PosX = 0.0 to CanvasWidth – 1 do
(
R = (PosX / CanvasWidth) * 255
G = (PosY / CanvasHeight) * 255
B = 100
A = 0
– a==0 or a==255, No difference
SetPixels procCanvas [PosX,PosY] #((color R G B A))
)
Display procCanvas