Class
MatrixPosition

Matrix-backed implementation of IPosition for precise 2D transforms when placing content in fixed documents.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Model.Data

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

cs-api-definition
public class MatrixPosition : IPosition

Inheritance: objectMatrixPosition

Implements: IPosition

Constructors

MatrixPosition()

Create a new instance with an identity matrix.

Declaration

cs-api-definition
public MatrixPosition()

MatrixPosition(IPosition)

Create a new instance by copying the matrix from another position.

Declaration

cs-api-definition
public MatrixPosition(IPosition other)

Parameters

other

IPosition

The position to copy transformation values from.

MatrixPosition(Matrix)

Create a new instance using the provided transformation matrix.

Declaration

cs-api-definition
public MatrixPosition(Matrix matrix)

Parameters

matrix

Matrix

The transformation matrix to use.

Properties

Default

Returns a new instance with identity transformation for convenience.

Declaration

cs-api-definition
public static MatrixPosition Default { get; }

Property Value

MatrixPosition

A new MatrixPosition instance with identity matrix.

Matrix

Transformation matrix that defines the current position, scale, and rotation.

Declaration

cs-api-definition
public Matrix Matrix { get; }

Property Value

Matrix

The transformation matrix containing scale, rotation, and translation values.

Implements IPosition.Matrix

Methods

Clear()

Resets all transformation values to their default state.

Declaration

cs-api-definition
public void Clear()

Implements IPosition.Clear()

Clone()

Creates a deep copy of the current matrix position with all transformation values.

Declaration

cs-api-definition
public IPosition Clone()

Returns

IPosition

A new MatrixPosition instance that is a copy of this instance.

Implements IPosition.Clone()

Rotate(double)

Applies rotation transformation by the specified angle around the origin.

Declaration

cs-api-definition
public void Rotate(double angle)

Parameters

angle

double

The rotation angle in degrees.

Implements IPosition.Rotate(double)

RotateAt(double, double, double)

Applies rotation transformation by the specified angle around a center point.

Declaration

cs-api-definition
public void RotateAt(double angle, double centerX, double centerY)

Parameters

angle

double

The rotation angle in degrees.

centerX

double

The X coordinate of the rotation center point.

centerY

double

The Y coordinate of the rotation center point.

Implements IPosition.RotateAt(double, double, double)

Scale(double, double)

Applies scaling transformation by the specified factors.

Declaration

cs-api-definition
public void Scale(double scaleX, double scaleY)

Parameters

scaleX

double

The horizontal scale factor.

scaleY

double

The vertical scale factor.

Implements IPosition.Scale(double, double)

ScaleAt(double, double, double, double)

Applies scaling transformation by the specified factors around a center point.

Declaration

cs-api-definition
public void ScaleAt(double scaleX, double scaleY, double centerX, double centerY)

Parameters

scaleX

double

The horizontal scale factor.

scaleY

double

The vertical scale factor.

centerX

double

The X coordinate of the scaling center point.

centerY

double

The Y coordinate of the scaling center point.

Implements IPosition.ScaleAt(double, double, double, double)

Translate(double, double)

Applies translation transformation by the specified offset values.

Declaration

cs-api-definition
public void Translate(double offsetX, double offsetY)

Parameters

offsetX

double

The horizontal translation offset.

offsetY

double

The vertical translation offset.

Implements IPosition.Translate(double, double)