Problem with SetClsColor
BlitzMax Forums/BlitzMax Beginners Area/Problem with SetClsColor
| ||
| Hi. I am trying to set the backround color of my canvas with the code below. I still get a black canvas, even though i have checked the RGB values set by SetClsColor. Is there something I am missing here? Local jcanvas:TGadget=CreateCanvas(100,100,320,240,window:Tgadget,0) SetGraphics CanvasGraphics(jcanvas) Print GraphicsDepth() Print GraphicsWidth() Print GraphicsHeight() SetClsColor 240,240,240 GetClsColor(R,G,B) Print R Print G Print B Cls Regards, JerryIlliniwek |
| ||
You not flipping...SuperStrict
Import maxgui.drivers
Global window:tgadget= CreateWindow("Main",100,100,300,300,,WINDOW_TITLEBAR|WINDOW_CENTER)
Local jcanvas:TGadget=CreateCanvas(100,100,320,240,window:Tgadget,0)
SetGraphics CanvasGraphics(jcanvas)
Print GraphicsDepth()
Print GraphicsWidth()
Print GraphicsHeight()
Local R%, G%, B%
SetClsColor 240,0,240
GetClsColor(R,G,B)
Print "r = "+R
Print "g = "+G
Print "b = "+B
Repeat
Cls
Flip
WaitEvent()
Select EventID()
Case EVENT_APPTERMINATE, EVENT_WINDOWCLOSE
End
End Select
Forever
|
| ||
| Thanks. That did it. JerryIlliniwek |