Matrix.Transform Methode

Definition

Transformiert den angegebenen Punkt, das angegebene Array von Punkten, den angegebenen Vektor oder das angegebene Array von Vektoren mit dieser Matrix.

Überlädt

Transform(Point)

Transformiert den angegebenen Punkt mit der Matrix und gibt das Ergebnis zurück.

Transform(Point[])

Transformiert die angegebenen Punkte mit dieser Matrix.

Transform(Vector)

Transformiert den angegebenen Vektor mit dieser Matrix.

Transform(Vector[])

Transformiert die angegebenen Vektoren mit dieser Matrix.

Beispiele

Im folgenden Beispiel wird gezeigt, wie sie eine Matrix Transformation von Punkten und Vektoren verwenden.

private void transformExamples()
{

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

     //
     // Transform a point.
     //            
     Point myPoint = new Point(15,25);
     
     // pointResult is (475, 680).
     Point pointResult = myMatrix.Transform(myPoint);
     
     //
     // Transform an array of points.
     //            
     Point[] myPointArray = new Point[]
        {new Point(15,25), new Point(30,35)};
        
     // myPointArray[0] becomes (475, 680).
     // myPointArray[1] becomes (700, 1030).
     myMatrix.Transform(myPointArray);
        
     //
     // Transform a vector.
     //
     Vector myVector = new Vector(15,25);
     
     // vectorResult becomes (450, 650).
     Vector vectorResult = myMatrix.Transform(myVector);
     
     //
     // Transform an array of vectors.
     //
     Vector[] myVectorArray = new Vector[]
        {new Vector(15, 25), new Vector(30,35)};
     
     // myVectorArray[0] becomes (450, 650).
     // myVectorArray[1] becomes (675, 1000).             
     myMatrix.Transform(myVectorArray);   
}

Transform(Point)

Transformiert den angegebenen Punkt mit der Matrix und gibt das Ergebnis zurück.

public:
 System::Windows::Point Transform(System::Windows::Point point);
public System.Windows.Point Transform (System.Windows.Point point);
member this.Transform : System.Windows.Point -> System.Windows.Point
Public Function Transform (point As Point) As Point

Parameter

point
Point

Der zu transformierende Punkt.

Gibt zurück

Point

Das Ergebnis der Transformation von point mit der Matrix.

Beispiele

Im folgenden Beispiel wird gezeigt, wie sie eine Matrix Transformation von Punkten und Vektoren verwenden.

private void transformExamples()
{

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

     //
     // Transform a point.
     //            
     Point myPoint = new Point(15,25);
     
     // pointResult is (475, 680).
     Point pointResult = myMatrix.Transform(myPoint);
     
     //
     // Transform an array of points.
     //            
     Point[] myPointArray = new Point[]
        {new Point(15,25), new Point(30,35)};
        
     // myPointArray[0] becomes (475, 680).
     // myPointArray[1] becomes (700, 1030).
     myMatrix.Transform(myPointArray);
        
     //
     // Transform a vector.
     //
     Vector myVector = new Vector(15,25);
     
     // vectorResult becomes (450, 650).
     Vector vectorResult = myMatrix.Transform(myVector);
     
     //
     // Transform an array of vectors.
     //
     Vector[] myVectorArray = new Vector[]
        {new Vector(15, 25), new Vector(30,35)};
     
     // myVectorArray[0] becomes (450, 650).
     // myVectorArray[1] becomes (675, 1000).             
     myMatrix.Transform(myVectorArray);   
}

Gilt für

Transform(Point[])

Transformiert die angegebenen Punkte mit dieser Matrix.

public:
 void Transform(cli::array <System::Windows::Point> ^ points);
public void Transform (System.Windows.Point[] points);
member this.Transform : System.Windows.Point[] -> unit
Public Sub Transform (points As Point())

Parameter

points
Point[]

Die zu transformierenden Punkte. Die ursprünglichen Punkte im Array werden durch ihre transformierten Werte ersetzt.

Beispiele

Im folgenden Beispiel wird gezeigt, wie sie eine Matrix Transformation von Punkten und Vektoren verwenden.

private void transformExamples()
{

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

     //
     // Transform a point.
     //            
     Point myPoint = new Point(15,25);
     
     // pointResult is (475, 680).
     Point pointResult = myMatrix.Transform(myPoint);
     
     //
     // Transform an array of points.
     //            
     Point[] myPointArray = new Point[]
        {new Point(15,25), new Point(30,35)};
        
     // myPointArray[0] becomes (475, 680).
     // myPointArray[1] becomes (700, 1030).
     myMatrix.Transform(myPointArray);
        
     //
     // Transform a vector.
     //
     Vector myVector = new Vector(15,25);
     
     // vectorResult becomes (450, 650).
     Vector vectorResult = myMatrix.Transform(myVector);
     
     //
     // Transform an array of vectors.
     //
     Vector[] myVectorArray = new Vector[]
        {new Vector(15, 25), new Vector(30,35)};
     
     // myVectorArray[0] becomes (450, 650).
     // myVectorArray[1] becomes (675, 1000).             
     myMatrix.Transform(myVectorArray);   
}

Gilt für

Transform(Vector)

Transformiert den angegebenen Vektor mit dieser Matrix.

public:
 System::Windows::Vector Transform(System::Windows::Vector vector);
public System.Windows.Vector Transform (System.Windows.Vector vector);
member this.Transform : System.Windows.Vector -> System.Windows.Vector
Public Function Transform (vector As Vector) As Vector

Parameter

vector
Vector

Der zu transformierende Vektor.

Gibt zurück

Vector

Das Ergebnis der Transformation von vector mit der Matrix.

Beispiele

Im folgenden Beispiel wird gezeigt, wie sie eine Matrix Transformation von Punkten und Vektoren verwenden.

private void transformExamples()
{

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

     //
     // Transform a point.
     //            
     Point myPoint = new Point(15,25);
     
     // pointResult is (475, 680).
     Point pointResult = myMatrix.Transform(myPoint);
     
     //
     // Transform an array of points.
     //            
     Point[] myPointArray = new Point[]
        {new Point(15,25), new Point(30,35)};
        
     // myPointArray[0] becomes (475, 680).
     // myPointArray[1] becomes (700, 1030).
     myMatrix.Transform(myPointArray);
        
     //
     // Transform a vector.
     //
     Vector myVector = new Vector(15,25);
     
     // vectorResult becomes (450, 650).
     Vector vectorResult = myMatrix.Transform(myVector);
     
     //
     // Transform an array of vectors.
     //
     Vector[] myVectorArray = new Vector[]
        {new Vector(15, 25), new Vector(30,35)};
     
     // myVectorArray[0] becomes (450, 650).
     // myVectorArray[1] becomes (675, 1000).             
     myMatrix.Transform(myVectorArray);   
}

Gilt für

Transform(Vector[])

Transformiert die angegebenen Vektoren mit dieser Matrix.

public:
 void Transform(cli::array <System::Windows::Vector> ^ vectors);
public void Transform (System.Windows.Vector[] vectors);
member this.Transform : System.Windows.Vector[] -> unit
Public Sub Transform (vectors As Vector())

Parameter

vectors
Vector[]

Die zu transformierenden Vektoren. Die ursprünglichen Vektoren im Array werden durch ihre transformierten Werte ersetzt.

Beispiele

Im folgenden Beispiel wird gezeigt, wie sie eine Matrix Transformation von Punkten und Vektoren verwenden.

private void transformExamples()
{

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

     //
     // Transform a point.
     //            
     Point myPoint = new Point(15,25);
     
     // pointResult is (475, 680).
     Point pointResult = myMatrix.Transform(myPoint);
     
     //
     // Transform an array of points.
     //            
     Point[] myPointArray = new Point[]
        {new Point(15,25), new Point(30,35)};
        
     // myPointArray[0] becomes (475, 680).
     // myPointArray[1] becomes (700, 1030).
     myMatrix.Transform(myPointArray);
        
     //
     // Transform a vector.
     //
     Vector myVector = new Vector(15,25);
     
     // vectorResult becomes (450, 650).
     Vector vectorResult = myMatrix.Transform(myVector);
     
     //
     // Transform an array of vectors.
     //
     Vector[] myVectorArray = new Vector[]
        {new Vector(15, 25), new Vector(30,35)};
     
     // myVectorArray[0] becomes (450, 650).
     // myVectorArray[1] becomes (675, 1000).             
     myMatrix.Transform(myVectorArray);   
}

Gilt für