GraphicsPath.CloseFigure メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > GraphicsPath.CloseFigure メソッドの意味・解説 

GraphicsPath.CloseFigure メソッド

現在の図形閉じ新し図形開始します現在の図形接続され直線曲線シーケンス含まれる場合、このメソッド終了点と開始点を直線接続することでループ閉じます

名前空間: System.Drawing.Drawing2D
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Dim instance As GraphicsPath

instance.CloseFigure
public void CloseFigure ()
public:
void CloseFigure ()
public void CloseFigure ()
使用例使用例

次のコード例は、Windows フォームでの使用意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは、新しパス作成して図形開始し、その図形交差する 2 本の直線追加してから図形閉じて三角形形成することで、三角形作成します次にパス画面描画されます。

Public Sub CloseFigureExample(ByVal
 e As PaintEventArgs)

    ' Create a path consisting of two, open-ended lines and close

    ' the lines using CloseFigure.
    Dim myPath As New GraphicsPath
    myPath.StartFigure()
    myPath.AddLine(New Point(10, 10), New Point(200,
 10))
    myPath.AddLine(New Point(200, 10), New
 Point(200, 200))
    myPath.CloseFigure()

    ' Draw the path to the screen.
    e.Graphics.DrawPath(Pens.Black, myPath)
End Sub
private void CloseFigureExample(PaintEventArgs
 e)
{
             
    // Create a path consisting of two, open-ended lines and close
             
    // the lines using CloseFigure.
    GraphicsPath myPath = new GraphicsPath();
    myPath.StartFigure();
    myPath.AddLine(new Point(10, 10), new Point(200,
 10));
    myPath.AddLine(new Point(200, 10), new
 Point(200, 200));
    myPath.CloseFigure();
             
    // Draw the path to the screen.
    e.Graphics.DrawPath(Pens.Black, myPath);
}
private:
   void CloseFigureExample( PaintEventArgs^ e )
   {
      // Create a path consisting of two, open-ended lines and close
      // the lines using CloseFigure.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->StartFigure();
      myPath->AddLine( Point(10,10), Point(200,10) );
      myPath->AddLine( Point(200,10), Point(200,200) );
      myPath->CloseFigure();

      // Draw the path to the screen.
      e->Graphics->DrawPath( Pens::Black, myPath );
   }
private void CloseFigureExample(PaintEventArgs
 e)
{
    // Create a path consisting of two, open-ended lines and close
    // the lines using CloseFigure.
    GraphicsPath myPath = new GraphicsPath();

    myPath.StartFigure();
    myPath.AddLine(new Point(10, 10), new Point(200,
 10));
    myPath.AddLine(new Point(200, 10), new
 Point(200, 200));
    myPath.CloseFigure();

    // Draw the path to the screen.
    e.get_Graphics().DrawPath(Pens.get_Black(), myPath);
} //CloseFigureExample
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からGraphicsPath.CloseFigure メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からGraphicsPath.CloseFigure メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からGraphicsPath.CloseFigure メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

GraphicsPath.CloseFigure メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



GraphicsPath.CloseFigure メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS