本文整理匯總了C#中PdfSharp.Drawing.XGraphicsPath.AddBeziers方法的典型用法代碼示例。如果您正苦於以下問題:C# XGraphicsPath.AddBeziers方法的具體用法?C# XGraphicsPath.AddBeziers怎麽用?C# XGraphicsPath.AddBeziers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PdfSharp.Drawing.XGraphicsPath
的用法示例。
在下文中一共展示了XGraphicsPath.AddBeziers方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RenderAlternatePath
void RenderAlternatePath(XGraphics gfx)
{
gfx.TranslateTransform(15, 20);
XPen pen = new XPen(XColors.Navy, 2.5);
// Alternate fill mode
XGraphicsPath path = new XGraphicsPath();
path.FillMode = XFillMode.Alternate;
path.AddLine(10, 130, 10, 40);
path.AddBeziers(new XPoint[]{new XPoint(10, 40), new XPoint(30, 0), new XPoint(40, 20), new XPoint(60, 40),
new XPoint(80, 60), new XPoint(100, 60), new XPoint(120, 40)});
path.AddLine(120, 40, 120, 130);
path.CloseFigure();
path.AddEllipse(40, 80, 50, 40);
gfx.DrawPath(pen, XBrushes.DarkOrange, path);
}
示例2: DrawPathAlternateAndWinding
/// <summary>
/// Draws an alternating and a winding path.
/// </summary>
void DrawPathAlternateAndWinding(XGraphics gfx, int number)
{
BeginBox(gfx, number, "DrawPath (alternate / winding)");
XPen pen = new XPen(XColors.Navy, 2.5);
// Alternate fill mode
XGraphicsPath path = new XGraphicsPath();
path.FillMode = XFillMode.Alternate;
path.AddLine(10, 130, 10, 40);
path.AddBeziers(new XPoint[]{new XPoint(10, 40), new XPoint(30, 0), new XPoint(40, 20), new XPoint(60, 40),
new XPoint(80, 60), new XPoint(100, 60), new XPoint(120, 40)});
path.AddLine(120, 40, 120, 130);
path.CloseFigure();
path.AddEllipse(40, 80, 50, 40);
gfx.DrawPath(pen, XBrushes.DarkOrange, path);
// Winding fill mode
path = new XGraphicsPath();
path.FillMode = XFillMode.Winding;
path.AddLine(130, 130, 130, 40);
path.AddBeziers(new XPoint[]{new XPoint(130, 40), new XPoint(150, 0), new XPoint(160, 20), new XPoint(180, 40),
new XPoint(200, 60), new XPoint(220, 60), new XPoint(240, 40)});
path.AddLine(240, 40, 240, 130);
path.CloseFigure();
path.AddEllipse(160, 80, 50, 40);
gfx.DrawPath(pen, XBrushes.DarkOrange, path);
EndBox(gfx);
}
示例3: RenderWindingPath
void RenderWindingPath(XGraphics gfx)
{
gfx.TranslateTransform(15, 150);
XPen pen = new XPen(XColors.Navy, 2.5);
// Winding fill mode
XGraphicsPath path = new XGraphicsPath();
path = new XGraphicsPath();
path.FillMode = XFillMode.Winding;
path.AddLine(130, 130, 130, 40);
path.AddBeziers(new XPoint[]{new XPoint(130, 40), new XPoint(150, 0), new XPoint(160, 20), new XPoint(180, 40),
new XPoint(200, 60), new XPoint(220, 60), new XPoint(240, 40)});
path.AddLine(240, 40, 240, 130);
path.CloseFigure();
path.AddEllipse(160, 80, 50, 40);
gfx.DrawPath(pen, XBrushes.DarkOrange, path);
}