Re: Make a solid line look like 3D
Re: Make a solid line look like 3D
- Subject: Re: Make a solid line look like 3D
- From: "I. Savant" <email@hidden>
- Date: Mon, 26 Oct 2009 13:08:04 -0400
On Oct 26, 2009, at 12:44 PM, Matthias Arndt wrote:
For some reasons I still don't understand (Argh!) the drawRect:
method of my view didn't pass the right rectangle to the object
actually responsible for the drawing. I just fixed the code to aim
for the best performance improvement: Don't draw at all (at least
not hidden objects). I'm satisfied with the result as the poor
performance was while zooming and scrolling zoomed areas, exactly
the situations, which benefit most from drawing only in the visible
part.
Well, this is an important issue. :-)
While you don't have to include all your drawing code, I would
encourage you to post at least the basics.
Speaking in the general sense and assuming your "stitch view" is
all one view (not a combination of subviews), your view should
definitely be getting only the visible rect passed into -drawRect:
when displaying it on screen in this way unless something's
specifically asking for the entire view (as in saving as an image or
printing).
If you're having problems that are causing the entire view to be
redrawn while zoomed into a small portion and scrolling around,
something is wrong and should be addressed.
Also, some people seem to want to call -drawRect: directly, or call
-display when they really should be calling -setNeedsDisplay:. Another
thing to consider is your NSScrollView settings in Interface
Builder ... is Copy On Scroll enabled or disabled?
The best way to get help from the list on this issue is to post
(the relevant parts of) your code.
--
I.S.
_______________________________________________
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