Problem with SetClsColor

BlitzMax Forums/BlitzMax Beginners Area/Problem with SetClsColor

Jerryilliniwek(Posted 2012) [#1]
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


therevills(Posted 2012) [#2]
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



Jerryilliniwek(Posted 2012) [#3]
Thanks. That did it.
JerryIlliniwek