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


必要に応じて、元の点を維持する必要があります。元の点は内部で 3 次ベジエ制御点に変換されるため、元の点を返す機構はありません。
このメソッドは、パスの中で新しいサブパスを開始します。サブパスを使用すると、パスを部分に区切り、GraphicsPathIterator クラスを使用してサブパスを反復できます。

次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは次のアクションを実行します。
-
2 セットの図形を追加します。最初のセットでは、4 つのプリミティブが 2 つの図形に結合されます。2 番目のセットでは、(y 軸がオフセットされることを除いて) 同じ 4 つのプリミティブが 3 つの図形に結合されます。
Public Sub StartFigureExample(ByVal e As PaintEventArgs) ' Create a GraphicsPath object. Dim myPath As New GraphicsPath ' First set of figures. myPath.StartFigure() myPath.AddArc(10, 10, 50, 50, 0, 270) myPath.AddLine(New Point(50, 0), New Point(100, 50)) myPath.AddArc(50, 100, 75, 75, 0, 270) myPath.CloseFigure() myPath.StartFigure() myPath.AddArc(100, 10, 50, 50, 0, 270) ' Second set of figures. myPath.StartFigure() myPath.AddArc(10, 200, 50, 50, 0, 270) myPath.CloseFigure() myPath.StartFigure() myPath.AddLine(New Point(60, 200), New Point(110, 250)) myPath.AddArc(50, 300, 75, 75, 0, 270) myPath.CloseFigure() myPath.StartFigure() myPath.AddArc(100, 200, 50, 50, 0, 270) ' Draw the path to the screen. e.Graphics.DrawPath(New Pen(Color.Black), myPath) End Sub
public void StartFigureExample(PaintEventArgs e) { // Create a GraphicsPath object. GraphicsPath myPath = new GraphicsPath(); // First set of figures. myPath.StartFigure(); myPath.AddArc(10, 10, 50, 50, 0, 270); myPath.AddLine(new Point(50, 0), new Point(100, 50)); myPath.AddArc(50, 100, 75, 75, 0, 270); myPath.CloseFigure(); myPath.StartFigure(); myPath.AddArc(100, 10, 50, 50, 0, 270); // Second set of figures. myPath.StartFigure(); myPath.AddArc(10, 200, 50, 50, 0, 270); myPath.CloseFigure(); myPath.StartFigure(); myPath.AddLine(new Point(60, 200), new Point(110, 250)); myPath.AddArc(50, 300, 75, 75, 0, 270); myPath.CloseFigure(); myPath.StartFigure(); myPath.AddArc(100, 200, 50, 50, 0, 270); // Draw the path to the screen. e.Graphics.DrawPath(new Pen(Color.Black), myPath); } // End StartFigureExample
public: void StartFigureExample( PaintEventArgs^ e ) { // Create a GraphicsPath object. GraphicsPath^ myPath = gcnew GraphicsPath; // First set of figures. myPath->StartFigure(); myPath->AddArc( 10, 10, 50, 50, 0, 270 ); myPath->AddLine( Point(50,0), Point(100,50) ); myPath->AddArc( 50, 100, 75, 75, 0, 270 ); myPath->CloseFigure(); myPath->StartFigure(); myPath->AddArc( 100, 10, 50, 50, 0, 270 ); // Second set of figures. myPath->StartFigure(); myPath->AddArc( 10, 200, 50, 50, 0, 270 ); myPath->CloseFigure(); myPath->StartFigure(); myPath->AddLine( Point(60,200), Point(110,250) ); myPath->AddArc( 50, 300, 75, 75, 0, 270 ); myPath->CloseFigure(); myPath->StartFigure(); myPath->AddArc( 100, 200, 50, 50, 0, 270 ); // Draw the path to the screen. e->Graphics->DrawPath( gcnew Pen( Color::Black ), myPath ); } // End StartFigureExample
public void StartFigureExample(PaintEventArgs e) { // Create a GraphicsPath object. GraphicsPath myPath = new GraphicsPath(); // First set of figures. myPath.StartFigure(); myPath.AddArc(10, 10, 50, 50, 0, 270); myPath.AddLine(new Point(50, 0), new Point(100, 50)); myPath.AddArc(50, 100, 75, 75, 0, 270); myPath.CloseFigure(); myPath.StartFigure(); myPath.AddArc(100, 10, 50, 50, 0, 270); // Second set of figures. myPath.StartFigure(); myPath.AddArc(10, 200, 50, 50, 0, 270); myPath.CloseFigure(); myPath.StartFigure(); myPath.AddLine(new Point(60, 200), new Point(110, 250)); myPath.AddArc(50, 300, 75, 75, 0, 270); myPath.CloseFigure(); myPath.StartFigure(); myPath.AddArc(100, 200, 50, 50, 0, 270); // Draw the path to the screen. e.get_Graphics().DrawPath(new Pen(Color.get_Black()), myPath); } //StartFigureExample // End StartFigureExample

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.StartFigure メソッドを検索する場合は、下記のリンクをクリックしてください。

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