Matrix.SkewPrepend(Double, Double) 方法

定義

在這個 Matrix 結構之前加上指定的 X 和 Y 維度度數的扭曲。Prepends a skew of the specified degrees in the x and y dimensions to this Matrix structure.

public:
 void SkewPrepend(double skewX, double skewY);
public void SkewPrepend (double skewX, double skewY);
member this.SkewPrepend : double * double -> unit
Public Sub SkewPrepend (skewX As Double, skewY As Double)

參數

skewX
Double

用來扭曲這個 Matrix 的 X 維度角度。The angle in the x dimension by which to skew this Matrix.

skewY
Double

用來扭曲這個 Matrix 的 Y 維度角度。The angle in the y dimension by which to skew this Matrix.

範例

這個範例會示範如何在結構前面加上扭曲 MatrixThis example shows how to prepend a skew to a Matrix structure.

private Matrix skewPrependExample()
{
    
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
    
    myMatrix.SkewPrepend(45, 180);

    // myMatrix is equal to (5, 10, 20, 30, 25, 30).
    return myMatrix;
}

備註

在複合轉換中,個別轉換的順序很重要。In a composite transformation, the order of individual transformations is important. 例如,如果您第一次旋轉,然後進行調整,然後轉譯,則會得到不同的結果,而不是您第一次轉譯、接著旋轉然後調整規模。For example, if you first rotate, then scale, then translate, you get a different result than if you first translate, then rotate, then scale. 其中一個原因是很重要的是,旋轉和縮放等轉換是針對座標系統的原點進行的。One reason order is significant is that transformations like rotation and scaling are done with respect to the origin of the coordinate system. 調整位於原點中央的物件會產生不同的結果,而不是縮放已從原點移出的物件。Scaling an object that is centered at the origin produces a different result than scaling an object that has been moved away from the origin. 同樣地,旋轉位於原點中央的物件會產生不同的結果,而不是旋轉離開來源的物件。Similarly, rotating an object that is centered at the origin produces a different result than rotating an object that has been moved away from the origin.

適用於

另請參閱