Matrix.Translate(Double, Double) Metoda

Definicja

Dołącza tłumaczenie określonych przesunięć do tej Matrix struktury.

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

Kwota przesunięcia tej Matrix wartości wzdłuż osi x.

offsetY
Double

Kwota przesunięcia tej Matrix wartości wzdłuż osi y.

Przykłady

W poniższym przykładzie pokazano, jak dołączyć tłumaczenie 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;
}

Dotyczy

Zobacz też