Export (0) Print
Expand All

Matrix.RotateAt Method

Rotates this matrix about the specified point.

Namespace:  System.Windows.Media
Assembly:  WindowsBase (in WindowsBase.dll)

public void RotateAt(
	double angle,
	double centerX,
	double centerY
)

Parameters

angle
Type: System.Double

The angle, in degrees, by which to rotate this matrix.

centerX
Type: System.Double

The x-coordinate of the point about which to rotate this matrix.

centerY
Type: System.Double

The y-coordinate of the point about which to rotate this matrix.

The following example shows how to rotate a Matrix about a specified point.

private Matrix rotateAboutPointExample()
{

    // Creating a Matrix structure.
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);

    // Rotate the matrix 90 degrees about the point (100,100). 
    // myMatrix becomes equal to (-10, 4, -20, 15, 170, 25).
    myMatrix.RotateAt(90, 100, 100);

    return myMatrix; 

}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft