Skip to content

PdfMatrix struct

View as Markdown

Namespace: PdfNetStack.Drawing
Assembly: PdfNetStack.dll
Package: PdfNetStack

A 2D affine transform in PDF order [a b c d e f]: x’ = a x + c y + e, y’ = b x + d y + f.

public readonly record struct PdfMatrix : IEquatable<PdfMatrix>

Implements

IEquatable<PdfMatrix>

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

Section titled “ PdfMatrix(double, double, double, double, double, double)”

A 2D affine transform in PDF order [a b c d e f]: x’ = a x + c y + e, y’ = b x + d y + f.

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

A double

Horizontal scale component.

B double

Vertical shear component.

C double

Horizontal shear component.

D double

Vertical scale component.

E double

Horizontal translation.

F double

Vertical translation.

Horizontal scale component.

public double A { get; init; }

double

Vertical shear component.

public double B { get; init; }

double

Horizontal shear component.

public double C { get; init; }

double

Vertical scale component.

public double D { get; init; }

double

Horizontal translation.

public double E { get; init; }

double

Vertical translation.

public double F { get; init; }

double

The identity transform.

public static PdfMatrix Identity { get; }

PdfMatrix

True when the transform can be inverted.

public bool IsInvertible { get; }

bool

A rotation about the origin. On the canvas, whose y axis points down, positive angles turn clockwise, as in CSS.

public static PdfMatrix CreateRotation(double degrees)

degrees double

PdfMatrix

A scale about the origin.

public static PdfMatrix CreateScale(double sx, double sy)

sx double

sy double

PdfMatrix

A skew by the given angles, in degrees.

public static PdfMatrix CreateSkew(double degreesX, double degreesY)

degreesX double

degreesY double

PdfMatrix

A translation.

public static PdfMatrix CreateTranslation(double dx, double dy)

dx double

dy double

PdfMatrix

The inverse transform.

public PdfMatrix Invert()

PdfMatrix

InvalidOperationException

The transform is singular.

The transform that applies first, then second.

public static PdfMatrix Multiply(PdfMatrix first, PdfMatrix second)

first PdfMatrix

second PdfMatrix

PdfMatrix

Applies the transform to a point.

public PdfPoint Transform(PdfPoint point)

point PdfPoint

PdfPoint