GraphicsPath.ClearMarkers メソッド
名前空間: System.Drawing.Drawing2D
アセンブリ: System.Drawing (system.drawing.dll 内)
構文

SetMarkers メソッドを使用して、GraphicsPath の現在の位置にマーカーを作成します。NextMarker メソッドを使用して、パスの既存のマーカーを反復します。
マーカーは、サブパスのグループを区切るために使用されます。2 つのマーカー間には、1 つ以上のサブパスを含めることができます。

次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub ClearMarkersExample(ByVal e As PaintEventArgs) ' Set several markers in a path. Dim myPath As New GraphicsPath myPath.AddEllipse(0, 0, 100, 200) myPath.SetMarkers() myPath.AddLine(New Point(100, 100), New Point(200, 100)) Dim rect As New Rectangle(200, 0, 100, 200) myPath.AddRectangle(rect) myPath.SetMarkers() myPath.AddLine(New Point(250, 200), New Point(250, 300)) myPath.SetMarkers() ' Clear the markers. myPath.ClearMarkers() ' Draw the path to the screen. Dim myPen As New Pen(Color.Black, 2) e.Graphics.DrawPath(myPen, myPath) End Sub
private void ClearMarkersExample(PaintEventArgs e) { // Set several markers in a path. GraphicsPath myPath = new GraphicsPath(); myPath.AddEllipse(0, 0, 100, 200); myPath.SetMarkers(); myPath.AddLine(new Point(100, 100), new Point(200, 100)); Rectangle rect = new Rectangle(200, 0, 100, 200); myPath.AddRectangle(rect); myPath.SetMarkers(); myPath.AddLine(new Point(250, 200), new Point(250, 300)); myPath.SetMarkers(); // Clear the markers. myPath.ClearMarkers(); // Draw the path to the screen. Pen myPen = new Pen(Color.Black, 2); e.Graphics.DrawPath(myPen, myPath); }
private: void ClearMarkersExample( PaintEventArgs^ e ) { // Set several markers in a path. GraphicsPath^ myPath = gcnew GraphicsPath; myPath->AddEllipse( 0, 0, 100, 200 ); myPath->SetMarkers(); myPath->AddLine( Point(100,100), Point(200,100) ); Rectangle rect = Rectangle(200,0,100,200); myPath->AddRectangle( rect ); myPath->SetMarkers(); myPath->AddLine( Point(250,200), Point(250,300) ); myPath->SetMarkers(); // Clear the markers. myPath->ClearMarkers(); // Draw the path to the screen. Pen^ myPen = gcnew Pen( Color::Black,2.0f ); e->Graphics->DrawPath( myPen, myPath ); }
private void ClearMarkersExample(PaintEventArgs e) { // Set several markers in a path. GraphicsPath myPath = new GraphicsPath(); myPath.AddEllipse(0, 0, 100, 200); myPath.SetMarkers(); myPath.AddLine(new Point(100, 100), new Point(200, 100)); Rectangle rect = new Rectangle(200, 0, 100, 200); myPath.AddRectangle(rect); myPath.SetMarkers(); myPath.AddLine(new Point(250, 200), new Point(250, 300)); myPath.SetMarkers(); // Clear the markers. myPath.ClearMarkers(); // Draw the path to the screen. Pen myPen = new Pen(Color.get_Black(), 2); e.get_Graphics().DrawPath(myPen, myPath); } //ClearMarkersExample

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

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