Re: Small animation
Re: Small animation
- Subject: Re: Small animation
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 21 Jan 2004 20:43:05 +0100
On mercredi, janvier 21, 2004, at 07:33 PM, Lorenzo wrote:
Hi,
thank you. I set 25 frame per second. It's better but it's so slow.
And if I
increment the x step and the y step of the movement to 2 pixels (it
was 1),
I get the same previous bad result.
I presume there should be a better way to do that.
Basically if you want to avoid OpenGL, I would try the following thing:
1) Get rid of the NSImageView, draw the image by yourself in the
drawRect:(NSRect) method.
2) In your updateView code, compute the union of the old image rect and
your new image rect.
3) Call the [self setNeedsDisplayInRect:theRect]; on this union.
4) In the drawRect:(NSRect) method, only draw the NSImage part that is
needed using the NSImage API.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.