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

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

GraphicsPath.AddLine メソッド (Point, Point)

GraphicsPath に線分追加します

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

Public Sub AddLine ( _
    pt1 As Point, _
    pt2 As Point _
)
Dim instance As GraphicsPath
Dim pt1 As Point
Dim pt2 As Point

instance.AddLine(pt1, pt2)
public void AddLine (
    Point pt1,
    Point pt2
)
public:
void AddLine (
    Point pt1, 
    Point pt2
)
public void AddLine (
    Point pt1, 
    Point pt2
)
public function AddLine (
    pt1 : Point, 
    pt2 : Point
)

パラメータ

pt1

直線開始点を表す Point

pt2

直線終了点を表す Point

解説解説

このメソッドは、指定した点によって定義され線分GraphicsPath末尾追加しますGraphicsPath前回描画され直線曲線がある場合は、そのパス最後の点と新し線分最初の点を結ぶ線分描画されます。

使用例使用例

例については、AddLine(Int32,Int32,Int32,Int32) のトピック参照してください

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

GraphicsPath.AddLine メソッド (Single, Single, Single, Single)

GraphicsPath に線分追加します

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

Public Sub AddLine ( _
    x1 As Single, _
    y1 As Single, _
    x2 As Single, _
    y2 As Single _
)
Dim instance As GraphicsPath
Dim x1 As Single
Dim y1 As Single
Dim x2 As Single
Dim y2 As Single

instance.AddLine(x1, y1, x2, y2)
public void AddLine (
    float x1,
    float y1,
    float x2,
    float y2
)
public:
void AddLine (
    float x1, 
    float y1, 
    float x2, 
    float y2
)
public void AddLine (
    float x1, 
    float y1, 
    float x2, 
    float y2
)
public function AddLine (
    x1 : float, 
    y1 : float, 
    x2 : float, 
    y2 : float
)

パラメータ

x1

直線開始点の x 座標

y1

直線開始点の y 座標

x2

直線終了点の x 座標

y2

直線終了点の y 座標

解説解説

このメソッドは、指定した点によって定義され線分GraphicsPath末尾追加しますGraphicsPath前回描画され直線曲線がある場合は、そのパス最後の点と新し線分最初の点を結ぶ線分描画されます。

使用例使用例

例については、AddLine(Int32,Int32,Int32,Int32) のトピック参照してください

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

GraphicsPath.AddLine メソッド

GraphicsPath に線分追加します
オーバーロードの一覧オーバーロードの一覧

名前 説明
GraphicsPath.AddLine (Point, Point) GraphicsPath線分追加します
GraphicsPath.AddLine (PointF, PointF) GraphicsPath線分追加します
GraphicsPath.AddLine (Int32, Int32, Int32, Int32) 現在の図形線分追加します
GraphicsPath.AddLine (Single, Single, Single, Single) GraphicsPath線分追加します
参照参照

関連項目

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

GraphicsPath.AddLine メソッド (PointF, PointF)

GraphicsPath に線分追加します

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

Public Sub AddLine ( _
    pt1 As PointF, _
    pt2 As PointF _
)
Dim instance As GraphicsPath
Dim pt1 As PointF
Dim pt2 As PointF

instance.AddLine(pt1, pt2)
public void AddLine (
    PointF pt1,
    PointF pt2
)
public:
void AddLine (
    PointF pt1, 
    PointF pt2
)
public void AddLine (
    PointF pt1, 
    PointF pt2
)
public function AddLine (
    pt1 : PointF, 
    pt2 : PointF
)

パラメータ

pt1

直線開始点を表す PointF。

pt2

直線終了点を表す PointF

解説解説

このメソッドは、指定した点によって定義され線分GraphicsPath末尾追加しますGraphicsPath前回描画され直線曲線がある場合は、そのパス最後の点と新し線分最初の点を結ぶ線分描画されます。

使用例使用例

例については、AddLine(Int32,Int32,Int32,Int32) のトピック参照してください

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

GraphicsPath.AddLine メソッド (Int32, Int32, Int32, Int32)

現在の図形線分追加します

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

Public Sub AddLine ( _
    x1 As Integer, _
    y1 As Integer, _
    x2 As Integer, _
    y2 As Integer _
)
Dim instance As GraphicsPath
Dim x1 As Integer
Dim y1 As Integer
Dim x2 As Integer
Dim y2 As Integer

instance.AddLine(x1, y1, x2, y2)
public void AddLine (
    int x1,
    int y1,
    int x2,
    int y2
)
public:
void AddLine (
    int x1, 
    int y1, 
    int x2, 
    int y2
)
public void AddLine (
    int x1, 
    int y1, 
    int x2, 
    int y2
)
public function AddLine (
    x1 : int, 
    y1 : int, 
    x2 : int, 
    y2 : int
)

パラメータ

x1

直線開始点の x 座標

y1

直線開始点の y 座標

x2

直線終了点の x 座標

y2

直線終了点の y 座標

解説解説

このメソッドは、指定した点によって定義され線分現在の図形末尾追加します。GraphicsPath に前回描画され直線曲線がある場合は、そのパス最後の点と新し線分最初の点を結ぶ線分描画されます。

使用例使用例

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

Public Sub AddLineExample(ByVal
 e As PaintEventArgs)

    ' Create a path and add a symetrical triangle using AddLine.
    Dim myPath As New GraphicsPath
    myPath.AddLine(30, 30, 60, 60)
    myPath.AddLine(60, 60, 0, 60)
    myPath.AddLine(0, 60, 30, 30)

    ' Draw the path to the screen.
    Dim myPen As New Pen(Color.Black,
 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub
private void AddLineExample(PaintEventArgs
 e)
{
             
    //Create a path and add a symetrical triangle using AddLine.
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddLine(30, 30, 60, 60);
    myPath.AddLine(60, 60, 0, 60);
    myPath.AddLine(0, 60, 30, 30);
             
    // Draw the path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
private:
   void AddLineExample( PaintEventArgs^ e )
   {
      //Create a path and add a symetrical triangle using AddLine.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddLine( 30, 30, 60, 60 );
      myPath->AddLine( 60, 60, 0, 60 );
      myPath->AddLine( 0, 60, 30, 30 );

      // Draw the path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddLineExample(PaintEventArgs
 e)
{
    //Create a path and add a symetrical triangle using AddLine.
    GraphicsPath myPath = new GraphicsPath();

    myPath.AddLine(30, 30, 60, 60);
    myPath.AddLine(60, 60, 0, 60);
    myPath.AddLine(0, 60, 30, 30);

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

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



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS