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
    • Roadmap
    • 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

Struct RadMatrix

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

Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Telerik.WinControls.Layouts
Assembly: Telerik.WinControls.dll

Syntax

public struct RadMatrix

Constructors

RadMatrix(Matrix)

Initializes a new RadMatrix, using the elements of the specified GDI+ Matrix instance.

Declaration
public RadMatrix(Matrix gdiMatrix)
Parameters
System.Drawing.Drawing2D.Matrix gdiMatrix

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
System.Drawing.PointF offset

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, 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

System.Drawing.PointF origin

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, 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

System.Drawing.PointF origin

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(RadMatrix)

Copy constructor.

Declaration
public RadMatrix(RadMatrix source)
Parameters
RadMatrix source

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 float M11
Field Value
System.Single

M12

Declaration
public float M12
Field Value
System.Single

M21

Declaration
public float M21
Field Value
System.Single

M22

Declaration
public 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

Divide(RadMatrix)

Declaration
public void Divide(RadMatrix m)
Parameters
RadMatrix m

Equals(Matrix)

Declaration
public bool Equals(Matrix gdiMatrix)
Parameters
System.Drawing.Drawing2D.Matrix gdiMatrix

Returns
System.Boolean

Equals(Object)

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

Returns
System.Boolean

Overrides
System.ValueType.Equals(System.Object)

Equals(Single[])

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

Returns
System.Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
System.Int32

Overrides
System.ValueType.GetHashCode()

Invert()

Declaration
public void Invert()

Multiply(RadMatrix)

Declaration
public void Multiply(RadMatrix m)
Parameters
RadMatrix m

Multiply(RadMatrix, MatrixOrder)

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

System.Drawing.Drawing2D.MatrixOrder order

PointsDistance(PointF, PointF)

Declaration
public static float PointsDistance(PointF pt1, PointF pt2)
Parameters
System.Drawing.PointF pt1

System.Drawing.PointF pt2

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

System.Drawing.Drawing2D.MatrixOrder order

RotateAt(Single, PointF)

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

System.Drawing.PointF origin

RotateAt(Single, PointF, MatrixOrder)

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

System.Drawing.PointF origin

System.Drawing.Drawing2D.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

System.Drawing.Drawing2D.MatrixOrder order

ToGdiMatrix()

Declaration
public Matrix ToGdiMatrix()
Returns
System.Drawing.Drawing2D.Matrix

ToString()

Declaration
public override string ToString()
Returns
System.String

Overrides
System.ValueType.ToString()

TransformPoint(PointF)

Declaration
public PointF TransformPoint(PointF point)
Parameters
System.Drawing.PointF point

Returns
System.Drawing.PointF

TransformPoints(PointF[])

Declaration
public void TransformPoints(PointF[] points)
Parameters
System.Drawing.PointF[] points

TransformRectangle(RectangleF)

Declaration
public RectangleF TransformRectangle(RectangleF bounds)
Parameters
System.Drawing.RectangleF bounds

Returns
System.Drawing.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

System.Drawing.Drawing2D.MatrixOrder order

Operators

Equality(RadMatrix, RadMatrix)

Declaration
public static bool operator ==(RadMatrix a, RadMatrix b)
Parameters
RadMatrix a

RadMatrix b

Returns
System.Boolean

Inequality(RadMatrix, RadMatrix)

Declaration
public static bool operator !=(RadMatrix a, RadMatrix b)
Parameters
RadMatrix a

RadMatrix b

Returns
System.Boolean

Multiply(RadMatrix, RadMatrix)

Declaration
public static RadMatrix operator *(RadMatrix a, RadMatrix b)
Parameters
RadMatrix a

RadMatrix b

Returns
RadMatrix

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • 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.