Can someone tell me why this is sooooo slow?

BlitzMax Forums/BlitzMax Programming/Can someone tell me why this is sooooo slow?

@BlackSp1der:
Thanks again for your code snippet. I was trying to figure out what you were doing in the top part of the program:
Strict

Graphics 800,600,0

SetMaskColor 255,0,255
Local circle:TImage=CreateImage(256,256)
MidHandleImage(circle)

SetColor 255,255,255
DrawRect 0,0,circle.Width,circle.Height
SetColor 255,0,255
For Local r:Int=0 Until circle.Width
	DrawOval((circle.Width-r)*0.5,(circle.Height-r)*0.5,r,r)
Next
GrabImage circle,0,0

and discovered that it runs excatly the same way if you change it to:
Strict

Graphics 800,600,0

SetMaskColor 255,0,255
Local circle:TImage=CreateImage(256,256)
MidHandleImage(circle)

SetColor 255,0,255
DrawOval(0,0,256,256)

GrabImage circle,0,0

What was the For/Next loop doing? And what do we need the rectangle for?

I'm surprised that the circle is transparent in the center since the BMax constant MASKEDIMAGE wasn't used when creating circle:TImage

Looks pretty smooth, even though MIPMAPPEDIMAGE wasn't used, too.

Thanks again.
Russell