Matrix.RotateAt(Double, Double, Double) Metoda

Definicja

Obraca tę macierz o określonym punkcie.

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)

Parametry

angle
Double

Kąt, w stopniach, do którego ma być obracana ta macierz.

centerX
Double

Współrzędna x punktu, o którym ma być obracana ta macierz.

centerY
Double

Współrzędna y punktu, o którym ma być obracana ta macierz.

Przykłady

W poniższym przykładzie pokazano, jak obrócić Matrix wartość o określonym punkcie.

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

Dotyczy