skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadMatrix

Represents a light-weight 3*3 Matrix to be used for GDI+ transformations.

Inheritance
System.Object
RadMatrix
Namespace: Telerik.Windows.Documents.Layout
Assembly: Telerik.Windows.Documents.dll

Syntax

public sealed class RadMatrix : ValueType

Constructors

RadMatrix(Single)

Initializes a new RadMatrix, rotated by the specified angle (in degrees) at origin (0, 0).

Declaration
public RadMatrix(float angle)
Parameters
System.Single angle

RadMatrix(Single, Single)

Initializes a new RadMatrix, scaling it by the provided parameters, at the origin (0, 0).

Declaration
public RadMatrix(float scaleX, float scaleY)
Parameters
System.Single scaleX

System.Single scaleY

RadMatrix(Single, Single, Single, Single, Single, Single)

Initializes a new RadMatrix, using the specified parameters.

Declaration
public RadMatrix(float m11, float m12, float m21, float m22, float dx, float dy)
Parameters
System.Single m11

System.Single m12

System.Single m21

System.Single m22

System.Single dx

System.Single dy

RadMatrix(Single, Single, PointF)

Initializes a new RadMatrix, scaling it by the provided parameters, at the specified origin.

Declaration
public RadMatrix(float scaleX, float scaleY, PointF origin)
Parameters
System.Single scaleX

System.Single scaleY

PointF origin

RadMatrix(Single, PointF)

Initializes a new RadMatrix, rotated by the specified angle (in degrees) at the provided origin.

Declaration
public RadMatrix(float angle, PointF origin)
Parameters
System.Single angle

PointF origin

RadMatrix(RadMatrix)

Copy constructor.

Declaration
public RadMatrix(RadMatrix source)
Parameters
RadMatrix source

RadMatrix(PointF)

Initializes a new RadMatrix, applying the specified X and Y values as DX and DY members of the matrix.

Declaration
public RadMatrix(PointF offset)
Parameters
PointF offset

Fields

DegreeToRadian

Declaration
public const float DegreeToRadian = 0.0174532942F
Field Value
System.Single

DX

Declaration
public float DX
Field Value
System.Single

DY

Declaration
public float DY
Field Value
System.Single

Empty

Declaration
public static readonly RadMatrix Empty
Field Value
RadMatrix

Identity

Declaration
public static readonly RadMatrix Identity
Field Value
RadMatrix

M11

Declaration
public static readonly float M11
Field Value
System.Single

M12

Declaration
public static readonly float M12
Field Value
System.Single

M21

Declaration
public static readonly float M21
Field Value
System.Single

M22

Declaration
public static readonly float M22
Field Value
System.Single

PI

Declaration
public const float PI = 3.141593F
Field Value
System.Single

RadianToDegree

Declaration
public const float RadianToDegree = 57.2957726F
Field Value
System.Single

TwoPI

Declaration
public const float TwoPI = 6.283186F
Field Value
System.Single

Properties

Determinant

Gets the determinant - [(M11 * M22) - (M12 * M21)] - of this Matrix.

Declaration
public float Determinant { get; }
Property Value
System.Single

Elements

Gets all the six fields of the matrix as an array.

Declaration
public float[] Elements { get; }
Property Value
System.Single[]

IsEmpty

Determines whether the current matrix is empty.

Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean

IsIdentity

Determines whether this matrix equals to the Identity one.

Declaration
public bool IsIdentity { get; }
Property Value
System.Boolean

IsInvertible

Determines whether this matrix may be inverted. That is to have non-zero determinant.

Declaration
public bool IsInvertible { get; }
Property Value
System.Boolean

Rotation

Gets the rotation (in degrees) applied to this matrix.

Declaration
public float Rotation { get; }
Property Value
System.Single

ScaleX

Gets the scale by the X axis, provided by this matrix.

Declaration
public float ScaleX { get; }
Property Value
System.Single

ScaleY

Gets the scale by the Y axis, provided by this matrix.

Declaration
public float ScaleY { get; }
Property Value
System.Single

Methods

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

Equals(Single[])

Declaration
public bool Equals(float[] elements)
Parameters
System.Single[] elements

Returns
System.Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
System.Int32

Multiply(RadMatrix)

Declaration
public void Multiply(RadMatrix matrix)
Parameters
RadMatrix matrix

Multiply(RadMatrix, MatrixOrder)

Declaration
public void Multiply(RadMatrix matrix, MatrixOrder order)
Parameters
RadMatrix matrix

MatrixOrder order

PointsDistance(PointF, PointF)

Declaration
public static float PointsDistance(PointF point1, PointF point2)
Parameters
PointF point1

PointF point2

Returns
System.Single

Reset()

Declaration
public void Reset()

Rotate(Single)

Declaration
public void Rotate(float angle)
Parameters
System.Single angle

Rotate(Single, MatrixOrder)

Declaration
public void Rotate(float angle, MatrixOrder order)
Parameters
System.Single angle

MatrixOrder order

RotateAt(Single, PointF)

Declaration
public void RotateAt(float angle, PointF origin)
Parameters
System.Single angle

PointF origin

RotateAt(Single, PointF, MatrixOrder)

Declaration
public void RotateAt(float angle, PointF origin, MatrixOrder order)
Parameters
System.Single angle

PointF origin

MatrixOrder order

Scale(Single, Single)

Declaration
public void Scale(float scaleX, float scaleY)
Parameters
System.Single scaleX

System.Single scaleY

Scale(Single, Single, MatrixOrder)

Declaration
public void Scale(float scaleX, float scaleY, MatrixOrder order)
Parameters
System.Single scaleX

System.Single scaleY

MatrixOrder order

ToString()

Declaration
public override string ToString()
Returns
System.String

TransformPoint(PointF)

Declaration
public PointF TransformPoint(PointF point)
Parameters
PointF point

Returns
PointF

TransformPoints(PointF[])

Declaration
public void TransformPoints(PointF[] points)
Parameters
PointF[] points

TransformRectangle(RectangleF)

Declaration
public RectangleF TransformRectangle(RectangleF bounds)
Parameters
RectangleF bounds

Returns
RectangleF

Translate(Single, Single)

Declaration
public void Translate(float dx, float dy)
Parameters
System.Single dx

System.Single dy

Translate(Single, Single, MatrixOrder)

Declaration
public void Translate(float dx, float dy, MatrixOrder order)
Parameters
System.Single dx

System.Single dy

MatrixOrder order

Operators

Equality(RadMatrix, RadMatrix)

Declaration
public static bool operator ==(RadMatrix matrix1, RadMatrix matrix2)
Parameters
RadMatrix matrix1

RadMatrix matrix2

Returns
System.Boolean

Inequality(RadMatrix, RadMatrix)

Declaration
public static bool operator !=(RadMatrix matrix1, RadMatrix matrix2)
Parameters
RadMatrix matrix1

RadMatrix matrix2

Returns
System.Boolean

Multiply(RadMatrix, RadMatrix)

Declaration
public static RadMatrix operator *(RadMatrix matrix1, RadMatrix matrix2)
Parameters
RadMatrix matrix1

RadMatrix matrix2

Returns
RadMatrix

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
  • Themes Generator
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
  • System Requirements
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.