Re: Drawing a polygon
Re: Drawing a polygon
- Subject: Re: Drawing a polygon
- From: Scott Anguish <email@hidden>
- Date: Sat, 12 Oct 2002 17:18:32 -0400
On Saturday, October 12, 2002, at 02:32 PM, Andrew Merenbach wrote:
This works very well, but is a bit slow for huge polygons (those with
more than several thousand sides). This is not a big issue, as I
detach a thread for the drawing, and I wanted to keep the interface
consistent (I'd feel a bit guilty about just drawing a circle for
polygons with more than 360 sides, for instance, especially if my
program ever evolves to manipulate the polygons it draws in other
ways).
The reason this gets slow is that all the line joins, and any
intersections are rather heavy on computation.
IF you aren't filling your poly, then using individual line segments
and draw them for each... this will give you a massive improvement in
speed.
I _think_ you can fill the poly from a large complex polygon without
as much of a hit performance wise...
_______________________________________________
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.