GraphicsPath.AddLine メソッド (Point, Point)
アセンブリ: System.Drawing (system.drawing.dll 内)


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


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddLine メソッド (Single, Single, Single, Single)
アセンブリ: System.Drawing (system.drawing.dll 内)

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)

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


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddLine メソッド

名前 | 説明 |
---|---|
GraphicsPath.AddLine (Point, Point) | GraphicsPath に線分を追加します。 |
GraphicsPath.AddLine (PointF, PointF) | GraphicsPath に線分を追加します。 |
GraphicsPath.AddLine (Int32, Int32, Int32, Int32) | 現在の図形に線分を追加します。 |
GraphicsPath.AddLine (Single, Single, Single, Single) | GraphicsPath に線分を追加します。 |

GraphicsPath.AddLine メソッド (PointF, PointF)
アセンブリ: System.Drawing (system.drawing.dll 内)


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


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddLine メソッド (Int32, Int32, Int32, Int32)
アセンブリ: System.Drawing (system.drawing.dll 内)

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)

このメソッドは、指定した点によって定義された線分を現在の図形の末尾に追加します。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

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からGraphicsPath.AddLineを検索する場合は、下記のリンクをクリックしてください。

- GraphicsPath.AddLineのページへのリンク