On Mar 31, 2005, at 12:17 PM, David Niemeijer wrote:
This was, as sometimes happens, an historical decision that "seemed
right at the time." This function was originally used for easy
layout in N-up printing. In that case, it seemed better to avoid
scaling up a PDF file when it was smaller than the page rect -
instead, we kept the size unchanged and centered the PDF in the page
rect. Unfortunately, this particular behavior now makes it necessary
to jump through some hoops if you want uniform scaling both up and
down.
And, probably those hoops are simple for you as you must be using
transformations all the time, but I have been puzzling on this now for
some time and cannot seem to figure out how to do this correctly. I
can scale easily, but then my image also needs to be translated to
keep it within my rectangle (if I just scale, it walks out of my rect
as I make the rect bigger and bigger). What would be the correct way
to do the upscaling taking into account the image's art box and the
rect I want to display it in?
A scale is always relative to the current origin. The easiest way to
get the scale you expect is to first translate the origin so that it's
at the point on your PDF that you expect to remain unchanged by the
scale (i.e., generally either the upper-left or lower-left corner). If
you scale and then translate it can be more confusing because you're
actually translating in the scaled coordinate system.
Regards,
Nick Nallick
_______________________________________________
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