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

適用於