Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: CGPDFPageGetDrawingTransform refuses to upscale



The function CGContextDrawPDFDocument scales up nicely. 

-----Original Message-----
From: quartz-dev-bounces+ejkerr=email@hidden
[mailto:quartz-dev-bounces+ejkerr=email@hidden] On Behalf
Of Derek Clegg
Sent: Thursday, March 31, 2005 12:28 PM
To: David Niemeijer
Cc: email@hidden
Subject: Re: CGPDFPageGetDrawingTransform refuses to upscale

On Mar 31, 2005, at 5:02 AM, David Niemeijer wrote:

> Hi,
>
> I  am drawing a PDF page like this:
>
> pageRef = CGPDFDocumentGetPage(inPDFDoc, 1) ;
> pageTransform = CGPDFPageGetDrawingTransform (pageRef,  
> kCGPDFArtBox, inRect, 0, true) ;
> CGContextConcatCTM (inContext, pageTransform);
> CGContextDrawPDFPage (inContext, pageRef);
>
> What I am seeing is that the image scales as long as inRect is  
> smaller than the artBox of the PDF, but as soon as inRect is larger  
> than the artBox of the PDF no scaling occurs. So I can effectively  
> downscale my image to fit a smaller inRect, but not upscale it to  
> fit a larger inRect. This is on 10.3.8.
>
> Am I doing something wrong? Should I use another method for  
> drawing? Is there something I need to do to get upscaling or is  
> this a bug?

For good or for ill, what you are seeing is the correct behavior.   
For upscaling, the "easiest" thing to do is to scale the context  
yourself before using the drawing transform.

Derek



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: CGPDFPageGetDrawingTransform refuses to upscale (From: Derek Clegg <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.