• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Drawing a polygon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Drawing a polygon (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: Two ways to get this NSTableView behaviour but I do not know how to implement either
  • Next by Date: Carbon Book (was Cocoa Books (was New to Cocoa))
  • Previous by thread: Drawing a polygon
  • Next by thread: Re: Two ways to get this NSTableView behaviour but I do not know how to implement either
  • Index(es):
    • Date
    • Thread