Re: NSBezierPath, Accessing elements of a NSBezierPath path
Re: NSBezierPath, Accessing elements of a NSBezierPath path
- Subject: Re: NSBezierPath, Accessing elements of a NSBezierPath path
- From: John Hörnkvist <email@hidden>
- Date: Thu, 12 Jul 2001 16:13:45 +0200
Raphael Sebbe wrote:
Never used that API before, but I have some question/comment for
NSBezierPath and circles. I am also interested in an answer to the
original post because I'd like to retrieve font glyphes and that is
probably a way to do it (using NSBezierPath).
NSBezierPath proposes an API for Bizier splines. But how are handled
circles and arcs which cannot represented by those ? The question is
does NSBezierPath use weighted splines (rational bezier, NURBs...)
internally or are there special drawing functions for those primitives,
or does it simply draws an approximation of a circle using traditional
bezier splines ?
Does anyone know ?
Last I checked, all drawing in NSBezierPath was implemented using "move
to", "line to" and "curve to".
IIRC, a "circle" is drawn using four curve segments.
Michel Haver wrote:
How can I access the elements of the CirclePath by using these
accessors?
If I draw a Circle by using NSBezierPath how can I extract for example
12
points from the Circle, each with a 30 degrees (360/12) difference to
each
other.
You don't extract points on the circle, you access the elements (lines,
curves, moves) of the bezier path.
So, using that API, you'll still have to compute the points on the
bezier path yourself.
Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com