Pause during drawing
Pause during drawing
- Subject: Pause during drawing
- From: Siegfried <email@hidden>
- Date: Tue, 9 Nov 2010 15:23:25 -0200
Hello,
For studying purposes (on recursion), I build a simple NSView subclass capable of drawing a SierpiĆski triangle.
The class has 2 helper methods to draw triangles and the fractal itself. The former is quite simple, draws triangles given start point, height and width. The latter, also simple, is called inside -drawRect and looks like:
void drawFractal x,y,w,h {
if (h < {predefined value} || w < {...}) {
drawTriangle x,y,w,h;
return;
}
drawFractal x,y,w/2,h/2 // for lower left Triangle
drawFractal ... // for top
drawFractal ... // for lower right
}
The question is:
Is it possible to "pause" after each call to -drawTriangle say for 0.25 second and redisplay the view, so I can see each triangle being draw?
Thanks in advance._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden