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

定義

この Matrix を、指定した点を中心として指定した量だけスケーリングします。

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

パラメーター

scaleX
Double

この Matrix を x 軸に沿ってスケーリングする量。

scaleY
Double

この Matrix を y 軸に沿ってスケーリングする量。

centerX
Double

スケーリング操作の中心点の x 座標。

centerY
Double

スケーリング操作の中心点の y 座標。

次の例は、構造体をスケーリングする方法を Matrix 示しています。


private Matrix scaleExample()
{
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
    
    // Scale myMatrix by a horizontal factor of 2
    // and a vertical factor of 4 about the origin.
    // After this operation,
    // myMatrix is equal to (10, 40, 30, 80, 50, 120)
    myMatrix.Scale(2, 4);
    
    return myMatrix;
}

private Matrix scaleAboutPointExample()
{
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
    
    // Scale myMatrix by a horizontal factor of 2
    // and a vertical factor of 4 about the 
    // point (100,100).
    // After this operation,
    // myMatrix is equal to (10, 40, 30, 80, -50, -180)
    myMatrix.ScaleAt(2, 4, 100, 100);
    
    return myMatrix;
}

適用対象