Re: Speed up drawing of View with multiple NSBezierPaths
Re: Speed up drawing of View with multiple NSBezierPaths
- Subject: Re: Speed up drawing of View with multiple NSBezierPaths
- From: Chuck Soper <email@hidden>
- Date: Sun, 6 Jul 2003 11:29:20 -0700
"Cocoa Programming" (Anguish, Buck, and Yacktman) has a good
discussion on optimized drawing in Chapter 13, Custom Views and
graphics Part II. There are techniques to turn off caching or adjust
flatness to speed up drawing. I'm not sure where else a detailed
discussion of optimized drawing is. Anyone?
Depending on your application could you just reduce the number of
NSBezierPaths. For example, if you're drawing a thousand rectangles
with a thousand NSBezierPaths you should be able to draw a thousand
rectangles with one NSBezierPath. Yet, all of the rectangles will
need to have the same attributes (line width, color, etc.).
Chuck
At 9:38 AM -0500 7/6/03, Jeff Skrysak wrote:
I'm working on some software that draws, in a small NSQuickDrawView, a
lot
of NSBezierPaths. So many, it gets quite slow.
Does anyone know of possible "generic" optimizations I can make to speed
things up? Generic meaning things that don't have to do with making the
algorithms
themselves, but with the paths or view(s). Settings, etc...
I guess it's kind of a hard question, but I do know that the function:
- (BOOL)isOpaque
{
return YES;
}
Is a good place to start, and is one example of the kind of thing I am
looking for.
(that function above goes in the view's code, and was mentioned in
Apple's
DotView example)
- Jeff
_______________________________________________
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.
_______________________________________________
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.