GraphicsPath.CloseAllFigures メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)


次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub CloseAllFiguresExample(ByVal e As PaintEventArgs) ' Create a path containing several open-ended figures. Dim myPath As 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() Dim point1 As New Point(300, 300) Dim point2 As New Point(400, 325) Dim point3 As New Point(400, 375) Dim point4 As New Point(300, 400) Dim points As Point() = {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) End Sub
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); }
private: void CloseAllFiguresExample( PaintEventArgs^ e ) { // Create a path containing several open-ended figures. GraphicsPath^ myPath = gcnew GraphicsPath; myPath->StartFigure(); myPath->AddLine( Point(10,10), Point(150,10) ); myPath->AddLine( Point(150,10), Point(10,150) ); myPath->StartFigure(); myPath->AddArc( 200, 200, 100, 100, 0, 90 ); myPath->StartFigure(); Point point1 = Point(300,300); Point point2 = Point(400,325); Point point3 = Point(400,375); Point point4 = Point(300,400); array<Point>^ points = {point1,point2,point3,point4}; myPath->AddCurve( points ); // Close all the figures. myPath->CloseAllFigures(); // Draw the path to the screen. e->Graphics->DrawPath( gcnew Pen( Color::Black,3.0f ), myPath ); }
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.get_Graphics().DrawPath(new Pen(Color.get_Black(), 3), myPath); } //CloseAllFiguresExample

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からGraphicsPath.CloseAllFigures メソッドを検索する場合は、下記のリンクをクリックしてください。

- GraphicsPath.CloseAllFigures メソッドのページへのリンク