Language

Matrix.RotateAtPrepend(Double, Double, Double) メソッド

定義

指定した角度の回転を、この Matrix 構造体の指定したポイントの前に付加します。

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

パラメーター

angle
Double

回転角度 (度単位)。

centerX
Double

回転中心の x 座標。

centerY
Double

回転中心の y 座標。

例

次の例は、回転を Matrixの前に追加する方法を示しています。

private Matrix prependRotateExample()
{

    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);

    // Prepend a 90 degree rotation about the origin.
    // myMatrix is now equal to  (15,20,-5,-10,25,30).
    myMatrix.RotatePrepend(90);

    return myMatrix;
}

private Matrix prependRotateAboutPointExample()
{

    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);

    // Prepend a 90 degree rotation about the 
    // point (100,100). 
    // myMatrix is now equal to  (15,20,-5,-10,1025,2030).
    myMatrix.RotateAtPrepend(90, 100, 100);

    return myMatrix;
}

注釈

複合変換では、個々の変換の順序が重要です。 たとえば、最初に回転し、その後に拡大縮小してから平行移動するのと、最初に平行移動し、その後に回転して拡大縮小するのでは、異なる結果が得られます。 順序が重要な理由の 1 つは、座標系の原点に対して回転やスケーリングなどの変換が行われることです。 原点を中心とするオブジェクトをスケーリングすると、原点から離れたオブジェクトのスケーリングとは異なる結果が生成されます。 同様に、原点を中心とするオブジェクトを回転すると、原点から離れたオブジェクトを回転する場合とは異なる結果が得られます。

適用対象