本文整理匯總了C#中System.Drawing.Drawing2D.GraphicsPath.CloseAllFigures方法的典型用法代碼示例。如果您正苦於以下問題:C# GraphicsPath.CloseAllFigures方法的具體用法?C# GraphicsPath.CloseAllFigures怎麽用?C# GraphicsPath.CloseAllFigures使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Drawing.Drawing2D.GraphicsPath
的用法示例。
在下文中一共展示了GraphicsPath.CloseAllFigures方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CloseAllFiguresExample
private void CloseAllFiguresExample(PaintEventArgs e)
{
// Create a path containing several open-ended figures.
GraphicsPath myPath = new GraphicsPath();
myPath.StartFigure();
myPath.AddLine(new Point(10, 10), new Point(150, 10));
myPath.AddLine(new Point(150, 10), new Point(10, 150));
myPath.StartFigure();
myPath.AddArc(200, 200, 100, 100, 0, 90);
myPath.StartFigure();
Point point1 = new Point(300, 300);
Point point2 = new Point(400, 325);
Point point3 = new Point(400, 375);
Point point4 = new Point(300, 400);
Point[] points = {point1, point2, point3, point4};
myPath.AddCurve(points);
// Close all the figures.
myPath.CloseAllFigures();
// Draw the path to the screen.
e.Graphics.DrawPath(new Pen(Color.Black, 3), myPath);
}