API referenceGraphics

pdfRotateCoords

Concatenate a rotation (by alpha degrees, counter-clockwise)

C
BOOL32 __stdcall pdfRotateCoords(PPDF IPDF, double alpha, double OriginX, double OriginY);
Delphi
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.

ParameterDescription
IPDFDocument handle.
alphaRotation angle in degrees, counter-clockwise.
OriginX, OriginYPivot 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)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Graphics
Category

Core

Exported names

pdfRotateCoords

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.