Re: Generating PDF images (+followup question)
Re: Generating PDF images (+followup question)
- Subject: Re: Generating PDF images (+followup question)
- From: Ken Ferry <email@hidden>
- Date: Fri, 28 May 2010 00:33:56 -0700
Heh. Okay, glad that made sense, but as discussed in all the other
resources, yes, context flippedness is a piece of _metadata_ orthogonal from
the CTM. You may consult it to get the high level notion of which way
should be considered "up".
On Fri, May 28, 2010 at 12:22 AM, Graham Cox <email@hidden> wrote:
> Hallelujah!!!
>
> Thanks Stephen, that's the piece of the puzzle I was missing. I was
> assuming (or misinterpreting) that passing flipped:YES for the
> NSGraphicsContext ACTUALLY FLIPPED the context, not just informed it that
> the context had been flipped.
>
> I found I had to set the CTM after the CGPDFContextBeginPage - looks like
> that might be resetting it, but basically, it works, I now get a right-way
> up PDF file.
>
> Now I know my source data really is right-side up, I can figure out the
> second part which is making sure images that embody it DRAW right-side up.
>
> thanks again, greatly relieved!
>
> --Graham
>
>
>
> On 28/05/2010, at 5:11 PM, Stephen J. Butler wrote:
>
> > CGContextTranslateCTM( pdfContext, 0.0, size.height );
> > // Now "flip" the y-axis so that it increases downwards
> > CGContextScaleCTM( pdfContext, 1.0, -1.0 );
>
> _______________________________________________
>
> 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
>
_______________________________________________
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