本文整理汇总了C#中System.Windows.Media.Matrix.Transform方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix.Transform方法的具体用法?C# Matrix.Transform怎么用?C# Matrix.Transform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了Matrix.Transform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: transformExamples
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);
}