how come this isnt drawing a circle

BlitzMax Forums/BlitzMax Beginners Area/how come this isnt drawing a circle

DREAM(Posted 2008) [#1]
on my screen i get a green mess....what am i doing wrong

Graphics 1024, 768, 0

Global dot = CreateImage(40, 40) 
SetColor 255, 250, 250
DrawOval 0, 0, 15, 15

HideMouse

While not KeyHit( KEY_ESCAPE )

	Cls
		SetColor 100, 250, 100
		DrawImage dot, mousex(),mousey(),0
	Flip

Wend

End



REDi(Posted 2008) [#2]
You need to grab the image from the back buffer.

Graphics 1024, 768, 0

Global dot:TImage = CreateImage(40, 40) 
SetColor 255, 250, 250
DrawOval 0, 0, 15, 15
GrabImage(dot,0,0)

HideMouse

While Not KeyHit( KEY_ESCAPE )

	Cls
		SetColor 100, 250, 100
		DrawImage dot, MouseX(),MouseY(),0
	Flip

Wend

End