• 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 Arcs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing Arcs


  • Subject: Re: Drawing Arcs
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Sun, 6 Jul 2003 22:05:24 +0100

On Sunday, July 6, 2003, at 08:14 pm, Henry McGilton wrote:

* * I notice that NSBezierPath can draw arcs that trace
* * along a circle, but not elliptical arcs. What's
* * the best approach for tackling this?
Sorry, I notice that NSBezierPath *can* draw arcs that trace along
elliptical arcs.

No, it can't (apart from a complete ellipse and the degenerate case of the two radii being the same), which is why the question was asked in the first place. But as you say you can use an NSAffineTransform to get what you're after.

So any time you see somebody writing about using Bezier curve
operators to approximate arcs, you can be sure they have overlooked
the obvious.

Indeed. Guilty as charged ;->. Actually I should have known that this was possible, because I'd been fooling around with the segment data from NSBezierPath objects a while back.

But, you get the desired effect (uniformly rendered attributes in
a transformed coordinate system) by using NSAffineTransform's
transformBezierPath method, which appears ready-made for just this
application.

I already sent a code sample to the list that does what is needed. Not sure why it hasn't arrived already.

Kind regards,

Alastair.
_______________________________________________
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: 
 >Re: Drawing Arcs (From: Henry McGilton <email@hidden>)

  • Prev by Date: Re: ScreenSaverView and subviews
  • Next by Date: Setting the origin of a GC
  • Previous by thread: Re: Drawing Arcs
  • Next by thread: Applescripts from foundation tool.
  • Index(es):
    • Date
    • Thread