Langue

Matrix.Transform Méthode

Définition

Transforme le point spécifié, le tableau de points, le vecteur ou le tableau de vecteurs par ce Matrix.

Surcharges

Nom Description
Transform(Point)

Transforme le point spécifié par le Matrix résultat et retourne le résultat.

Transform(Point[])

Transforme les points spécifiés par ce Matrix.

Transform(Vector)

Transforme le vecteur spécifié par ce Matrix.

Transform(Vector[])

Transforme les vecteurs spécifiés par ce Matrix.

Exemples

L’exemple suivant montre comment utiliser un Matrix pour transformer des points et des vecteurs.

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)

Transforme le point spécifié par le Matrix résultat et retourne le résultat.

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

Paramètres

point
Point

Point à transformer.

Retours

Résultat de la point transformation par ce Matrix.

Exemples

L’exemple suivant montre comment utiliser un Matrix pour transformer des points et des vecteurs.

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);   
}

S’applique à

Transform(Point[])

Transforme les points spécifiés par ce 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())

Paramètres

points
Point[]

Points à transformer. Les points d’origine du tableau sont remplacés par leurs valeurs transformées.

Exemples

L’exemple suivant montre comment utiliser un Matrix pour transformer des points et des vecteurs.

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);   
}

S’applique à

Transform(Vector)

Transforme le vecteur spécifié par ce 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

Paramètres

vector
Vector

Vecteur à transformer.

Retours

Résultat de la vector transformation par ce Matrix.

Exemples

L’exemple suivant montre comment utiliser un Matrix pour transformer des points et des vecteurs.

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);   
}

S’applique à

Transform(Vector[])

Transforme les vecteurs spécifiés par ce 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())

Paramètres

vectors
Vector[]

Vecteurs à transformer. Les vecteurs d’origine dans le tableau sont remplacés par leurs valeurs transformées.

Exemples

L’exemple suivant montre comment utiliser un Matrix pour transformer des points et des vecteurs.

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);   
}

S’applique à