pdfRotateCoords
Concatenate a rotation (by alpha degrees, counter-clockwise)
BOOL32 __stdcall pdfRotateCoords(PPDF IPDF, double alpha, double OriginX, double OriginY);
function pdfRotateCoords(const IPDF: PPDF; alpha, OriginX, OriginY: Double): LongBool; stdcall;
Purpose. Concatenate a rotation (by alpha degrees, counter-clockwise) around an arbitrary pivot point (OriginX, OriginY) onto the current transform.
Description. Computes the standard rotate-about-a-point 2×3 affine matrix (cos/sin of alpha converted from degrees to radians, with the translation terms derived so the pivot point itself is fixed under the rotation) and applies it via the same cm-emit-plus-ComposeCTM pattern as pdfSetMatrix. Equivalent to, but more convenient than, computing that matrix by hand and calling pdfSetMatrix.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
alpha | Rotation angle in degrees, counter-clockwise. |
OriginX, OriginY | Pivot point, in the current (pre-rotation) coordinate system. |
Return value. True on success; False if there is no current content stream.
See also. pdfScaleCoords, pdfSkewCoords.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfRotateCoords
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.