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

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

GraphicsPath.AddLines メソッド (PointF[])

GraphicsPath の末尾に、結ばれた一連の線分追加します

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

Public Sub AddLines ( _
    points As PointF() _
)
Dim instance As GraphicsPath
Dim points As PointF()

instance.AddLines(points)
public void AddLines (
    PointF[] points
)
public:
void AddLines (
    array<PointF>^ points
)
public void AddLines (
    PointF[] points
)
public function AddLines (
    points : PointF[]
)

パラメータ

points

追加する線分定義する複数の点を表す PointF 構造体配列

解説解説
使用例使用例
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間

GraphicsPath.AddLines メソッド (Point[])

GraphicsPath の末尾に、結ばれた一連の線分追加します

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

解説解説
使用例使用例

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

最初の点以降の各直線は前の点を開始点として使用し新しい点を終了点として使用します

Public Sub AddLinesExample(ByVal
 e As PaintEventArgs)

    'Create a symetrical triangle using an array of points.
    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)

    ' Draw the path to the screen.
    Dim myPen As New Pen(Color.Black,
 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub
private void AddLinesExample(PaintEventArgs
 e)
{
             
    // Create a symetrical triangle using an array of points.
    Point[] myArray =
             {
                 new Point(30,30),
                 new Point(60,60),
                 new Point(0,60),
                 new Point(30,30)
             };
             
    //Create a path and add lines.
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddLines(myArray);
             
    // Draw the path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
private:
   void AddLinesExample( PaintEventArgs^ e )
   {
      // Create a symetrical triangle using an array of points.
      array<Point>^ myArray = {Point(30,30),Point(60,60),Point(0,60),Point(30
,30)};

      //Create a path and add lines.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddLines( myArray );

      // Draw the path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddLinesExample(PaintEventArgs
 e)
{
    // Create a symetrical triangle using an array of points.
    Point myArray[] = { new Point(30, 30), new
 Point(60, 60),
                        new Point(0, 60), new
 Point(30, 30) };

    //Create a path and add lines.
    GraphicsPath myPath = new GraphicsPath();

    myPath.AddLines(myArray);

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

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

GraphicsPath.AddLines メソッド

GraphicsPath の末尾に、結ばれた一連の線分追加します
オーバーロードの一覧オーバーロードの一覧

名前 説明
GraphicsPath.AddLines (Point[]) GraphicsPath末尾に、結ばれた一連の線分追加します
GraphicsPath.AddLines (PointF[]) GraphicsPath末尾に、結ばれた一連の線分追加します
参照参照

関連項目

GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS