Matrix.Transform 메서드

정의

Matrix를 사용하여 지정한 점, 점 배열, 벡터 또는 벡터 배열을 변환합니다.

오버로드

Transform(Point)

Matrix를 사용하여 지정한 점을 변환한 다음 결과를 반환합니다.

Transform(Point[])

Matrix를 사용하여 지정한 점을 변환합니다.

Transform(Vector)

Matrix를 사용하여 지정한 벡터를 변환합니다.

Transform(Vector[])

Matrix를 사용하여 지정한 벡터를 변환합니다.

예제

다음 예제에서는 사용 하는 Matrix 점 및 벡터 변환 합니다.

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)

Matrix를 사용하여 지정한 점을 변환한 다음 결과를 반환합니다.

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

매개 변수

point
Point

변형할 점입니다.

반환

Point

Matrix를 사용하여 point를 변환한 결과입니다.

예제

다음 예제에서는 사용 하는 Matrix 점 및 벡터 변환 합니다.

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[])

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())

매개 변수

points
Point[]

변환할 점입니다. 배열의 원래 지점은 해당 변환 값으로 대체됩니다.

예제

다음 예제에서는 사용 하는 Matrix 점 및 벡터 변환 합니다.

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(Vector)

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

매개 변수

vector
Vector

변환할 벡터입니다.

반환

Vector

Matrix를 사용하여 vector를 변환한 결과입니다.

예제

다음 예제에서는 사용 하는 Matrix 점 및 벡터 변환 합니다.

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(Vector[])

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())

매개 변수

vectors
Vector[]

변환할 벡터입니다. 배열의 원래 벡터는 해당 변환 값으로 대체됩니다.

예제

다음 예제에서는 사용 하는 Matrix 점 및 벡터 변환 합니다.

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

적용 대상