SceneTransform Struct

An affine transform: a point (x, y) becomes (A x + C y + E, B x + D y + F).

public readonly struct SceneTransform : IEquatable<SceneTransform>
Implements

Constructors

NameDescription
SceneTransform(double, double, double, double, double, double)An affine transform: a point (x, y) becomes (A x + C y + E, B x + D y + F).

SceneTransform(double, double, double, double, double, double)

An affine transform: a point (x, y) becomes (A x + C y + E, B x + D y + F).

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

Parameters

A double
The scale along x.
B double
The skew of y by x.
C double
The skew of x by y.
D double
The scale along y.
E double
The translation along x.
F double
The translation along y.

Properties

NameDescription
AThe scale along x.
BThe skew of y by x.
CThe skew of x by y.
DThe scale along y.
EThe translation along x.
FThe translation along y.
IdentityGets the transform that changes nothing.
IsTranslationGets a value that indicates whether the transform only translates.

The scale along x.

public double A { get; init; }

Property value

double

The skew of y by x.

public double B { get; init; }

Property value

double

The skew of x by y.

public double C { get; init; }

Property value

double

The scale along y.

public double D { get; init; }

Property value

double

The translation along x.

public double E { get; init; }

Property value

double

The translation along y.

public double F { get; init; }

Property value

double

Gets the transform that changes nothing.

public static SceneTransform Identity { get; }

Property value

SceneTransform

IsTranslation

SceneTransform.cs

Gets a value that indicates whether the transform only translates.

public bool IsTranslation { get; }

Property value

bool

Methods

NameDescription
Apply(double, double)Applies the transform to a point.
Deconstruct(double, double, double, double, double, double)
Equals(SceneTransform)
Equals(object)
GetHashCode()
Rotate(double, double, double)Creates a rotation around a point.
ToString()
Translate(double, double)Creates a translation.

Apply(double, double)

SceneTransform.cs

Applies the transform to a point.

public (double X, double Y) Apply(double x, double y)

Parameters

x double
The x coordinate of the point.
y double
The y coordinate of the point.

Returns

(double X, double Y) The transformed point.

Deconstruct(double, double, double, double, double, double)

public void Deconstruct(out double A, out double B, out double C, out double D, out double E, out double F)

No documentation is available.

Equals overloads

Equals(SceneTransform)

public bool Equals(SceneTransform other)
Parameters
other SceneTransform
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

Rotate(double, double, double)

SceneTransform.cs

Creates a rotation around a point.

public static SceneTransform Rotate(double degrees, double centerX = 0d, double centerY = 0d)

Parameters

degrees double
The angle, in degrees, clockwise.
centerX double
The x coordinate of the center of the rotation.
centerY double
The y coordinate of the center of the rotation.

Returns

SceneTransform The transform.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Translate(double, double)

SceneTransform.cs

Creates a translation.

public static SceneTransform Translate(double x, double y)

Parameters

x double
The translation along x.
y double
The translation along y.

Returns

SceneTransform The transform.

Operators

NameDescription
operator ==(SceneTransform, SceneTransform)
operator !=(SceneTransform, SceneTransform)

operator ==(SceneTransform, SceneTransform)

public static bool operator ==(SceneTransform left, SceneTransform right)

Parameters

left SceneTransform
right SceneTransform

Returns

bool

No documentation is available.

operator !=(SceneTransform, SceneTransform)

public static bool operator !=(SceneTransform left, SceneTransform right)

Parameters

left SceneTransform
right SceneTransform

Returns

bool

No documentation is available.