New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class MatrixPosition : IPosition

Inheritance: objectMatrixPosition

Implements: IPosition

Constructors

Create a new instance with an identity matrix.

C#
public MatrixPosition()

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

C#
public MatrixPosition(IPosition other)
Parameters:otherIPosition

The position to copy transformation values from.

Create a new instance using the provided transformation matrix.

C#
public MatrixPosition(Matrix matrix)
Parameters:matrixMatrix

The transformation matrix to use.

Methods

Resets all transformation values to their default state.

C#
public void Clear()

Implements: IPosition.Clear()

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

C#
public IPosition Clone()
Returns:

IPosition

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

Implements: IPosition.Clone()

Applies rotation transformation by the specified angle around the origin.

C#
public void Rotate(double angle)
Parameters:angledouble

The rotation angle in degrees.

Implements: IPosition.Rotate(double)

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

C#
public void RotateAt(double angle, double centerX, double centerY)
Parameters:angledouble

The rotation angle in degrees.

centerXdouble

The X coordinate of the rotation center point.

centerYdouble

The Y coordinate of the rotation center point.

Implements: IPosition.RotateAt(double, double, double)

Applies scaling transformation by the specified factors.

C#
public void Scale(double scaleX, double scaleY)
Parameters:scaleXdouble

The horizontal scale factor.

scaleYdouble

The vertical scale factor.

Implements: IPosition.Scale(double, double)

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

C#
public void ScaleAt(double scaleX, double scaleY, double centerX, double centerY)
Parameters:scaleXdouble

The horizontal scale factor.

scaleYdouble

The vertical scale factor.

centerXdouble

The X coordinate of the scaling center point.

centerYdouble

The Y coordinate of the scaling center point.

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

Applies translation transformation by the specified offset values.

C#
public void Translate(double offsetX, double offsetY)
Parameters:offsetXdouble

The horizontal translation offset.

offsetYdouble

The vertical translation offset.

Implements: IPosition.Translate(double, double)

Properties

Returns a new instance with identity transformation for convenience.

C#
public static MatrixPosition Default { get; }
Property Value:

A new MatrixPosition instance with identity matrix.

Matrix

Matrix

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

C#
public Matrix Matrix { get; }
Property Value:

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

Implements: IPosition.Matrix