Table of Contents

Struct PdfMatrix

Namespace
PdfEngine.Geometry
Assembly
PdfEngine.Abstractions.dll

Immutable 2D affine transformation matrix using PDF conventions: [ A B 0 ] [ C D 0 ] [ E F 1 ] where (x', y') = (Ax + Cy + E, Bx + Dy + F).

public readonly record struct PdfMatrix : IEquatable<PdfMatrix>
Implements
Inherited Members

Constructors

PdfMatrix(double, double, double, double, double, double)

Immutable 2D affine transformation matrix using PDF conventions: [ A B 0 ] [ C D 0 ] [ E F 1 ] where (x', y') = (Ax + Cy + E, Bx + Dy + F).

public PdfMatrix(double A, double B, double C, double D, double E, double F)

Parameters

A double
B double
C double
D double
E double
F double

Fields

Identity

public static readonly PdfMatrix Identity

Field Value

PdfMatrix

Properties

A

public double A { get; init; }

Property Value

double

B

public double B { get; init; }

Property Value

double

C

public double C { get; init; }

Property Value

double

D

public double D { get; init; }

Property Value

double

Determinant

public double Determinant { get; }

Property Value

double

E

public double E { get; init; }

Property Value

double

F

public double F { get; init; }

Property Value

double

IsIdentity

public bool IsIdentity { get; }

Property Value

bool

IsInvertible

public bool IsInvertible { get; }

Property Value

bool

Methods

CreateRotation(double)

public static PdfMatrix CreateRotation(double angleRadians)

Parameters

angleRadians double

Returns

PdfMatrix

CreateScale(double, double)

public static PdfMatrix CreateScale(double sx, double sy)

Parameters

sx double
sy double

Returns

PdfMatrix

CreateTranslation(double, double)

public static PdfMatrix CreateTranslation(double dx, double dy)

Parameters

dx double
dy double

Returns

PdfMatrix

Multiply(in PdfMatrix)

Multiplies this matrix by another: result = this * other. In PDF concatenation cm: CTM_new = M * CTM_old, so matrix multiplication matches standard row-vector convention.

public PdfMatrix Multiply(in PdfMatrix m)

Parameters

m PdfMatrix

Returns

PdfMatrix

Transform(PdfPoint)

public PdfPoint Transform(PdfPoint p)

Parameters

p PdfPoint

Returns

PdfPoint

Transform(PdfRect)

public PdfRect Transform(PdfRect rect)

Parameters

rect PdfRect

Returns

PdfRect

Transform(double, double)

public PdfPoint Transform(double x, double y)

Parameters

x double
y double

Returns

PdfPoint

TryInvert(out PdfMatrix)

public bool TryInvert(out PdfMatrix inverse)

Parameters

inverse PdfMatrix

Returns

bool

Operators

operator *(in PdfMatrix, in PdfMatrix)

public static PdfMatrix operator *(in PdfMatrix left, in PdfMatrix right)

Parameters

left PdfMatrix
right PdfMatrix

Returns

PdfMatrix