Matrix.Transform Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Transformerar den angivna punkten, matrisen med punkter, vektor eller matris med vektorer med den här Matrix.
Överlagringar
| Name | Description |
|---|---|
| Transform(Point) |
Transformerar den angivna punkten med Matrix och returnerar resultatet. |
| Transform(Point[]) |
Transformerar de angivna punkterna med den här Matrix. |
| Transform(Vector) |
Transformerar den angivna vektorn med den här Matrix. |
| Transform(Vector[]) |
Transformerar angivna vektorer med den här Matrix. |
Exempel
I följande exempel visas hur du använder en Matrix för att transformera punkter och vektorer.
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)
Transformerar den angivna punkten med Matrix och returnerar resultatet.
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
Parametrar
- point
- Point
Punkten att transformera.
Returer
Resultatet av transformering point av den här Matrix.
Exempel
I följande exempel visas hur du använder en Matrix för att transformera punkter och vektorer.
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);
}
Gäller för
Transform(Point[])
Transformerar de angivna punkterna med den här 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())
Parametrar
- points
- Point[]
Punkterna som ska transformeras. De ursprungliga punkterna i matrisen ersätts med deras transformerade värden.
Exempel
I följande exempel visas hur du använder en Matrix för att transformera punkter och vektorer.
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);
}
Gäller för
Transform(Vector)
Transformerar den angivna vektorn med den här 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
Parametrar
- vector
- Vector
Vektorn som ska transformeras.
Returer
Resultatet av transformering vector av den här Matrix.
Exempel
I följande exempel visas hur du använder en Matrix för att transformera punkter och vektorer.
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);
}
Gäller för
Transform(Vector[])
Transformerar angivna vektorer med den här 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())
Parametrar
- vectors
- Vector[]
De vektorer som ska transformeras. De ursprungliga vektorerna i matrisen ersätts med deras transformerade värden.
Exempel
I följande exempel visas hur du använder en Matrix för att transformera punkter och vektorer.
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);
}