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

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

GraphicsPath.CloseAllFigures メソッド

このパス開いているすべての図形閉じ新し図形開始します開いている各図形は、その終了点と開始点を直線接続することで閉じられます。

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

Public Sub CloseAllFigures
Dim instance As GraphicsPath

instance.CloseAllFigures
public void CloseAllFigures ()
public:
void CloseAllFigures ()
public void CloseAllFigures ()
public function CloseAllFigures ()
使用例使用例

次のコード例は、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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS