Returns the affine transform that maps a box to a given rectangle on a PDF page.
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Graphics
A constant that specifies the type of box. For possible values, see
A Quartz rectangle.
An integer, that must be a multiple of
90, that specifies the angle by which the specified rectangle is rotated clockwise.
A Boolean value that specifies whether or not the aspect ratio should be preserved. A value of
truespecifies that the aspect ratio should be preserved.
An affine transform that maps the box specified by the
box parameter to the rectangle specified by the
Quartz constructs the affine transform as follows:
Computes the effective rectangle by intersecting the rectangle associated with
/Mediaentry of the specified page.
Rotates the effective rectangle according to the page’s
Centers the resulting rectangle on
rect.If the value of the
rotateparameter is non-zero, then the rectangle is rotated clockwise by rotate degrees. The value of
rotatemust be a multiple of 90.
Scales the rectangle, if necessary, so that it coincides with the edges of
rect. If the value of
true, then the final rectangle coincides with the edges of
rectonly in the more restrictive dimension.