• 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: Cocoa and PICT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa and PICT


  • Subject: Re: Cocoa and PICT
  • From: Scott Thompson <email@hidden>
  • Date: Fri, 10 Aug 2007 16:57:28 -0500


On Aug 10, 2007, at 4:25 PM, Alastair Houghton wrote:

On 10 Aug 2007, at 14:51, glenn andreas wrote:

There's even support for smoothing polygons using picture comments, which might be handy for simulating bezier paths.

Quickdraw pic comment based smooth polygons are cubics, and bezier paths are quadratic curves, and converting from one to the other is non-trivial (for any sort of decent quality).

I think you got that the wrong way round. QuickDraw PolySmooth picture comment uses quadratic curves; NSBezierPath provides a cubic primitive. (Plainly you knew what you meant, since converting quadratic curves to cubics is easy... it's the other way that requires piecewise approximation.)


Kind regards,

Alastair.

Well, if we're going to pick on Glenn :-)

It's also the case that the cubic and quadratic curves are both Bezier curves. So the more accurate statement might be that "QuickDraw's pic comment based smooth polygons are quadratic bezier curves" while "NSBezierPath are based on cubic bezier curves".

It's interesting to note, however, that the Core Graphics library that lies underneath NSBezierPath has direct support for quadratic bezier curves. See CGContextAddQuadCurveToPoint

In Tiger It's not too hard to put some Quartz 2D calls in the midst of your NSBezierPath-and-friends drawing so if you REALLY wanted to parse the PICT comments and draw quadratic curves, you could probably do it without too much trouble.

Scott

P.S.  Blast from the past : http://www.mactech.com/articles/mactech/Vol.04/04.12/PicComments/index.html

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cocoa and PICT
      • From: Alastair Houghton <email@hidden>
References: 
 >Cocoa and PICT (From: "I. Savant" <email@hidden>)
 >Re: Cocoa and PICT (From: Uli Kusterer <email@hidden>)
 >Re: Cocoa and PICT (From: glenn andreas <email@hidden>)
 >Re: Cocoa and PICT (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: pointer assignment inherently atomic ?
  • Next by Date: Re: Watching folders for new files and event handling based on that?
  • Previous by thread: Re: Cocoa and PICT
  • Next by thread: Re: Cocoa and PICT
  • Index(es):
    • Date
    • Thread