Matrix.Translate(Double, Double) Metoda

Definice

Připojí k této Matrix struktuře překlad zadaných posunů.

public:
 void Translate(double offsetX, double offsetY);
public void Translate (double offsetX, double offsetY);
member this.Translate : double * double -> unit
Public Sub Translate (offsetX As Double, offsetY As Double)

Parametry

offsetX
Double

Množství posunu Matrix na ose x.

offsetY
Double

Velikost posunu Matrix podél osy y.

Příklady

Následující příklad ukazuje, jak připojit překlad do Matrix struktury.

private Matrix translateExample()
{
    
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
    
    myMatrix.Translate(5, 10);

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

Platí pro

Viz také