Graphics.DrawLines メソッド (Pen, Point[])
アセンブリ: System.Drawing (system.drawing.dll 内)



このメソッドは、終了点の配列を接続する一連の直線を描画します。配列の最初の 2 つの点によって最初の直線が指定されます。それ以降の各点によって、前の線分の終了点を開始点とする線分の末尾が指定されます。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub DrawLinesPoint(ByVal e As PaintEventArgs) ' Create pen. Dim blackPen As New Pen(Color.Black, 3) ' Create array of points that define lines to draw. Dim points As Point() = {New Point(10, 10), New Point(10, 100), _ New Point(200, 50), New Point(250, 300)} 'Draw lines to screen. e.Graphics.DrawLines(blackPen, points) End Sub
public void DrawLinesPoint(PaintEventArgs e) { // Create pen. Pen pen = new Pen(Color.Black, 3); // Create array of points that define lines to draw. Point[] points = { new Point(10, 10), new Point(10, 100), new Point(200, 50), new Point(250, 300) }; //Draw lines to screen. e.Graphics.DrawLines(pen, points); }
public: void DrawLinesPoint( PaintEventArgs^ e ) { // Create pen. Pen^ pen = gcnew Pen( Color::Black,3.0f ); // Create array of points that define lines to draw. array<Point>^ points = {Point(10,10),Point(10,100),Point(200,50),Point(250 ,300)}; //Draw lines to screen. e->Graphics->DrawLines( pen, points ); }
public void DrawLinesPoint(PaintEventArgs e) { // Create pen. Pen pen = new Pen(Color.get_Black(), 3); // Create array of points that define lines to draw. Point points[] = {new Point(10, 10), new Point(10, 100), new Point(200, 50), new Point(250, 300)}; //Draw lines to screen. e.get_Graphics().DrawLines(pen, points); } //DrawLinesPoint

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


Graphics.DrawLines メソッド (Pen, PointF[])
アセンブリ: System.Drawing (system.drawing.dll 内)



このメソッドは、終了点の配列を接続する一連の直線を描画します。配列の最初の 2 つの点によって最初の直線が指定されます。それ以降の各点によって、前の線分の終了点を開始点とする線分の末尾が指定されます。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub DrawLinesPointF(ByVal e As PaintEventArgs) ' Create pen. Dim blackPen As New Pen(Color.Black, 3) ' Create array of points that define lines to draw. Dim points As PointF() = {New PointF(10.0F, 10.0F), _ New PointF(10.0F, 100.0F), New PointF(200.0F, 50.0F), _ New PointF(250.0F, 300.0F)} 'Draw lines to screen. e.Graphics.DrawLines(blackPen, points) End Sub
public void DrawLinesPointF(PaintEventArgs e) { // Create pen. Pen pen = new Pen(Color.Black, 3); // Create array of points that define lines to draw. PointF[] points = { new PointF(10.0F, 10.0F), new PointF(10.0F, 100.0F), new PointF(200.0F, 50.0F), new PointF(250.0F, 300.0F) }; //Draw lines to screen. e.Graphics.DrawLines(pen, points); }
public: void DrawLinesPointF( PaintEventArgs^ e ) { // Create pen. Pen^ pen = gcnew Pen( Color::Black,3.0f ); // Create array of points that define lines to draw. array<PointF>^ points = {PointF(10.0F,10.0F),PointF(10.0F,100.0F),PointF(200.0F ,50.0F),PointF(250.0F,300.0F)}; //Draw lines to screen. e->Graphics->DrawLines( pen, points ); }
public void DrawLinesPointF(PaintEventArgs e) { // Create pen. Pen pen = new Pen(Color.get_Black(), 3); // Create array of points that define lines to draw. PointF points[] = {new PointF(10, 10), new PointF(10, 100), new PointF(200, 50), new PointF(250, 300)}; //Draw lines to screen. e.get_Graphics().DrawLines(pen, points); } //DrawLinesPointF

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

- Graphics.DrawLinesのページへのリンク