• 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: NSBezierPath clockwise?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath clockwise?


  • Subject: Re: NSBezierPath clockwise?
  • From: Gregory Weston <email@hidden>
  • Date: Sat, 15 Oct 2005 11:45:04 -0400

On Oct 15, 2005, at 9:05 AM, Lorenzo wrote:

Hi,
I have to detect whether a bezier path describing a polygon, is clockwise or
anti-clockwise. For closed filled shapes non concave, as a circle, is pretty
easy. I get the center of the shape, then I check the first 2 points of the
path. If they create a positive angle with the center, well, it's
anti-clockwise.
...
My rough idea is:
a) I get a direction comparing 3 points of the curve. e.g. It's clowise.
b) Then if at the right of each point I don't find the filled area of
the polygon, I have to invert the direction thus it's anti- clockwise.


Could this method work in any case?
Any suggestion?

I'm not sure about others, but I'm having the impression that this is one of those questions that's best-answered by the question "What are you really trying to accomplish?" As in, what's the goal of determining whether a path goes "clockwise?"


G
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Playing with fire (completing localization in native applications)
  • Next by Date: sending an email from an app
  • Previous by thread: NSBezierPath clockwise?
  • Next by thread: Re: NSBezierPath clockwise?
  • Index(es):
    • Date
    • Thread