Re: Cocoa wizard & gurus, Help!!
Re: Cocoa wizard & gurus, Help!!
- Subject: Re: Cocoa wizard & gurus, Help!!
- From: Alexander Griekspoor <email@hidden>
- Date: Thu, 12 Feb 2004 11:17:14 +0100
Andrew,
Indeed the current approach is kind of a memory hog, but then again my
images are very wide, but not very tall (only 200px). The speed is just
perfect. But I guess this all just forces me to take a different route,
usually this eventually turns out to be the better way, I know. This
also means I can do another optimisation I should do, using
NSLayoutManager to do my text drawing. Just a few remaining quick
questions I you permit me. My app should be Jaguar compliant, so is
there still a way to use the getRectsBeingDrawn:count: method if the
user runs Panther, but not if he/she runs Jaguar?
Second, someone posted that it would be wiser to stroke a bezierpath
immediately instead of accumulating all points a do the stroke once, is
that indeed faster?
Finally, I asked if you can use the big progressbar spinning style here:
http://cocoa.mamasam.com/COCOADEV/2004/02/1/84055.php
Do you perhaps know the answer?
Many many thanks for the help!
Alex
Op 12-feb-04 om 0:31 heeft Andrew Platzer het volgende geschreven:
On Feb 11, 2004, at 3:22 PM, email@hidden wrote:
I guess I noticed indeed ;-) It's a pitty it is this way, but I'm
afraid there's nothing else to do to go for the tiled caching. The
problem is a quite a bit of rewriting draw methods, but not
impossible.
Would you perhaps know of any source examples using such a technique?
Splitting the view up is not a problem, I'm just wondering if I would
not get a lot of trouble at the boundaries of the tiles. But I guess
that is something I have to think about when rewriting my methods. At
least I have the confirmation there is not much else to consider...
Drawing obviously always HAS to occur in a window then...
I don't know of any source code. Keeping around large caches takes a
lot of memory. An 8K x 8K image with 32 bit RGBA uses 256MB of memory.
You're better of optimizing by limiting to the rectangle passed in to
the -drawRect: call as the area to update and in Panther, using
-[NSView getRectsBeingDrawn:count:] is even more efficient.
If edge issues are a problem, just allow a bit of overlapping of the
tiles when drawing into them and then the joins will look smooth when
copied to the screen.
Andrew
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
E-mail: email@hidden
Web:
http://www.mekentosj.com
Microsoft is not the answer,
Microsoft is the question,
NO is the answer
*********************************************************
_______________________________________________
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.