Matrix.Transform メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
この 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を変換した結果。
例
次の例では、 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を変換した結果。
例
次の例では、 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);
}