Matrix.RotateAt(Double, Double, Double) 方法

定义

绕指定的点旋转此矩阵。

public:
 void RotateAt(double angle, double centerX, double centerY);
public void RotateAt (double angle, double centerX, double centerY);
member this.RotateAt : double * double * double -> unit
Public Sub RotateAt (angle As Double, centerX As Double, centerY As Double)

参数

angle
Double

此矩阵要旋转的角度(单位为度)。

centerX
Double

此矩阵要围绕其旋转的点的 x 坐标。

centerY
Double

此矩阵要围绕其旋转的点的 y 坐标。

示例

以下示例演示如何围绕指定点旋转 Matrix

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; 
}

适用于