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

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

GraphicsPath.AddPath メソッド

指定されGraphicsPath をこのパス追加します

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

Public Sub AddPath ( _
    addingPath As GraphicsPath, _
    connect As Boolean _
)
Dim instance As GraphicsPath
Dim addingPath As GraphicsPath
Dim connect As Boolean

instance.AddPath(addingPath, connect)
public void AddPath (
    GraphicsPath addingPath,
    bool connect
)
public:
void AddPath (
    GraphicsPath^ addingPath, 
    bool connect
)
public void AddPath (
    GraphicsPath addingPath, 
    boolean connect
)
public function AddPath (
    addingPath : GraphicsPath, 
    connect : boolean
)

パラメータ

addingPath

追加する GraphicsPath。

connect

追加されパス最初図形が、このパス最後図形一部になるかどうか指定する Boolean 値。値が true場合は、追加されパス最初図形が、このパス最後図形一部なります (可能な場合)。値が false場合は、追加されパス最初図形が、このパス最後図形から分離されます。

使用例使用例

次のコード例は、Windows フォームでの使用意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコード次のアクション実行します

Public Sub AddPathExample(ByVal
 e As PaintEventArgs)

    ' Creates a symetrical triangle and adds an inverted triangle.

    ' Create the first path - right side up triangle.
    Dim myArray As Point() = {New Point(30,
 30), New Point(60, 60), _
    New Point(0, 60), New Point(30, 30)}
    Dim myPath As New GraphicsPath
    myPath.AddLines(myArray)

    ' Create the second path - inverted triangle.
    Dim myArray2 As Point() = {New Point(30,
 30), New Point(0, 0), _
    New Point(60, 0), New Point(30, 30)}
    Dim myPath2 As New GraphicsPath
    myPath2.AddLines(myArray2)

    ' Add the second path to the first path.
    myPath.AddPath(myPath2, True)

    ' Draw the combined path to the screen.
    Dim myPen As New Pen(Color.Black,
 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub
private void AddPathExample(PaintEventArgs
 e)
{
             
    // Create the first pathright side up triangle.
    Point[] myArray =
             {
                 new Point(30,30),
                 new Point(60,60),
                 new Point(0,60),
                 new Point(30,30)
             };
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddLines(myArray);
             
    // Create the second pathinverted triangle.
    Point[] myArray2 =
             {
                 new Point(30,30),
                 new Point(0,0),
                 new Point(60,0),
                 new Point(30,30)
             };
    GraphicsPath myPath2 = new GraphicsPath();
    myPath2.AddLines(myArray2);
             
    // Add the second path to the first path.
    myPath.AddPath(myPath2,true);
             
    // Draw the combined path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
private:
   void AddPathExample( PaintEventArgs^ e )
   {
      // Create the first pathright side up triangle.
      array<Point>^ myArray = {Point(30,30),Point(60,60),Point(0,60),Point(30
,30)};
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddLines( myArray );

      // Create the second pathinverted triangle.
      array<Point>^ myArray2 = {Point(30,30),Point(0,0),Point(60,0),Point(30
,30)};
      GraphicsPath^ myPath2 = gcnew GraphicsPath;
      myPath2->AddLines( myArray2 );

      // Add the second path to the first path.
      myPath->AddPath( myPath2, true );

      // Draw the combined path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddPathExample(PaintEventArgs
 e)
{
    // Create the first pathright side up triangle.
    Point myArray[] = { new Point(30, 30), new
 Point(60, 60), 
                        new Point(0, 60), new
 Point(30, 30) };
    GraphicsPath myPath = new GraphicsPath();

    myPath.AddLines(myArray);

    // Create the second pathinverted triangle.
    Point myArray2[] = { new Point(30, 30), new
 Point(0, 0), 
                        new Point(60, 0), new
 Point(30, 30) };
    GraphicsPath myPath2 = new GraphicsPath();

    myPath2.AddLines(myArray2);

    // Add the second path to the first path.
    myPath.AddPath(myPath2, true);

    // Draw the combined path to the screen.
    Pen myPen = new Pen(Color.get_Black(), 2);

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


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS