Re:NSBezierPath alloc
Re:NSBezierPath alloc
- Subject: Re:NSBezierPath alloc
- From: Developer <email@hidden>
- Date: Tue, 26 Feb 2002 13:49:55 -0500
OK...I take it back. It's not the allocating. It's the stroke command.
Anybody have any suggestions to optimize the drawing. It will always be
straight lines. I have redone this using the strokeLineFromPoint function.
This does make it much faster but doesn't give me any of the nice stuff you
get when the path is stored.
Any suggestions are appreciated.
>
============================================================================
>
Is there some way to allocate a bunch of memory for a NSBezierPath. My path
>
is going to have several thousand endpoints. It currently takes forever for
>
the points to be appended. I'm assuming this is due to the memory overhead
>
when adding each node.
>
>
Here's the code example. Please ignore Entourage's annoying "feature" of
>
capitalizing things for me.
>
>
NSPoint p;
>
Int I;
>
>
Path = [[NSBezierPath alloc] init];
>
[path moveToPoint: p];
>
For (I=0; I<1000; I++) {
>
[path lineToPoint: p];
>
}
Mark
_______________________________________________
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.