本文整理汇总了C#中PdfSharp.Drawing.XMatrix.ToMatrix方法的典型用法代码示例。如果您正苦于以下问题:C# XMatrix.ToMatrix方法的具体用法?C# XMatrix.ToMatrix怎么用?C# XMatrix.ToMatrix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PdfSharp.Drawing.XMatrix
的用法示例。
在下文中一共展示了XMatrix.ToMatrix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Widen
/// <summary>
/// Replaces this path with curves that enclose the area that is filled when this path is drawn
/// by the specified pen.
/// </summary>
public void Widen(XPen pen, XMatrix matrix, double flatness)
{
this.gdipPath.Widen(pen.RealizeGdiPen(), matrix.ToMatrix(), (float)flatness);
}
示例2: Flatten
/// <summary>
/// Converts each curve in this XGraphicsPath into a sequence of connected line segments.
/// </summary>
public void Flatten(XMatrix matrix)
{
this.gdipPath.Flatten(matrix.ToMatrix());
}
示例3: Test
/// <summary>
/// Some test code to check that there are no typing errors in the formulars.
/// </summary>
public static void Test()
{
XMatrix xm1 = new XMatrix(23, -35, 837, 332, -3, 12);
Matrix m1 = new Matrix(23, -35, 837, 332, -3, 12);
DumpMatrix(xm1, m1);
XMatrix xm2 = new XMatrix(12, 235, 245, 42, 33, -56);
Matrix m2 = xm2.ToMatrix();
DumpMatrix(xm2, m2);
// xm1.Multiply(xm2, XMatrixOrder.Prepend);
// m1.Multiply(m2, MatrixOrder.Append);
xm1.Multiply(xm2, XMatrixOrder.Append);
m1.Multiply(m2, MatrixOrder.Append);
DumpMatrix(xm1, m1);
xm1.Translate(-243, 342, XMatrixOrder.Append);
m1.Translate(-243, 342, MatrixOrder.Append);
DumpMatrix(xm1, m1);
xm1.Scale(-5.66, 7.87);
m1.Scale(-5.66f, 7.87f);
// xm1.Scale(-5.66, 7.87, XMatrixOrder.Prepend);
// m1.Scale(-5.66f, 7.87f, MatrixOrder.Prepend);
DumpMatrix(xm1, m1);
xm1.Rotate(135, XMatrixOrder.Append);
m1.Rotate(135, MatrixOrder.Append);
// xm1.Scale(-5.66, 7.87, XMatrixOrder.Prepend);
// m1.Scale(-5.66f, 7.87f, MatrixOrder.Prepend);
DumpMatrix(xm1, m1);
xm1.RotateAt(177, new XPoint(-3456, 654), XMatrixOrder.Append);
m1.RotateAt(177, new PointF(-3456, 654), MatrixOrder.Append);
DumpMatrix(xm1, m1);
xm1.Shear(0.76, -0.87, XMatrixOrder.Prepend);
m1.Shear(0.76f, -0.87f, MatrixOrder.Prepend);
DumpMatrix(xm1, m1);
xm1 = new XMatrix(23, -35, 837, 332, -3, 12);
m1 = new Matrix(23, -35, 837, 332, -3, 12);
XPoint[] xpoints = new XPoint[3]{new XPoint(23, 10), new XPoint(-27, 120), new XPoint(-87, -55)};
PointF[] points = new PointF[3]{new PointF(23, 10), new PointF(-27, 120), new PointF(-87, -55)};
xm1.TransformPoints(xpoints);
m1.TransformPoints(points);
xm1.Invert();
m1.Invert();
DumpMatrix(xm1, m1);
}