Re: Cocoa and PICT
Re: Cocoa and PICT
- Subject: Re: Cocoa and PICT
- From: glenn andreas <email@hidden>
- Date: Thu, 9 Aug 2007 09:39:33 -0500
On Aug 9, 2007, at 9:14 AM, I. Savant wrote:
List:
I've run into what looks to be a recurring Cocoa developer nightmare
and I'm having difficulty coalescing the various limitations,
workarounds, and documented statements of "support". The problem?
Cocoa's apparent ineptitude with the PICT format.
So there's my problem: I need transparency *and* vector information
preserved and can see no way of doing so. It'd be great if I could go
straight from PDF to PICT or at least indirectly without *loss of
data*, but can see no way of doing either. That is of course absurd,
given that Cocoa with Quartz2D is the newer API. I don't get it; PICT
is Apple's *own format*. Why is it treated as a second-class citizen
but marked in the documentation s "supported"?
PICT is part of Quickdraw, which is deprecated (and pretty much been
neglected since OS X was released and the switch was made from
Quickdraw + PICT to Quartz + PDF).
Does anybody have any suggestions on how to go from my
nicely-rendered view contents to well-formed PICT data for use with
NSPICTPboardType *without* losing transparency or being rasterized? Is
there some obvious path I'm missing?
You can't - PICT does not support a wide variety of things that PDF
does, including line miters/end caps, compositing modes, dashed
lines, "round" pens, bezier curves, affine transforms on arbitrary
objects, and a whole lot of other differences between the rendering
models such as integer vs float point coordinates, location of
"pixels" relative to coordinates, etc... The only way to get a
reasonable PICT representation is to rasterize the PDF (as you've seen).
If you need to create a PICT, the best way is probably to just use
Carbon/Quickdraw and create a graf port, OpenPicture, draw your
content using quickdraw commands, etc... That will allow you to make
the appropriate trade-offs between the features of PDF and the (far
more limited) features of Quickdraw.
_______________________________________________
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