Re: Quickest Drawing Method
Re: Quickest Drawing Method
- Subject: Re: Quickest Drawing Method
- From: spiderlama <email@hidden>
- Date: Sat, 28 Jul 2007 17:52:52 +1000
On 27/07/2007, at 11:38 AM, arri wrote:
my approach at this point is;
- create a tiny bitmap (CGBitmapContext) that containst all
elements needed to draw the 'big image'
- from that image, create tiles (corners, borders body etc..) and
cache those as CGLayers
the docs teach us that those are actually cached on the graphics-
card where approreate/needed/possible..
- in the drawrect:-routine, check what needs to be drawn, and draw
only that.
So if I was to apply this methodology to my app, I should:
- create a CGBitmapContext (how do I make it small/contain all the
images I want to draw)
- create a CGLayer for each of the images I need to draw
- in drawRect make the path and then draw the images as needed.
I don't know if this method would increase the drawing speed. If a
small part of my window needs drawing, then every image has to be
applied again (as every image is applied to the full size of the
window). Meaning that no steps can be skipped for different drawing
rectangles. Right now I:
- create CGImages of the images
- in drawRect make the path and then draw the images.
I think the "lagginess" comes from the fact that I am continually
changing the window's size.
Cheers
Matt
_______________________________________________
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