Wide Polyline: DrawLines
using System;
using System.Drawing;
using System.Windows.Forms;
class WidePolyline: Form
{
public static void Main()
{
Application.Run(new WidePolyline());
}
public WidePolyline()
{
ResizeRedraw = true;
}
protected override void OnPaint(PaintEventArgs pea)
{
DoPage(pea.Graphics, ForeColor,ClientSize.Width, ClientSize.Height);
}
protected void DoPage(Graphics grfx, Color clr, int cx, int cy)
{
Pen pen = new Pen(clr, 25);
grfx.DrawLines(pen, new Point[] {
new Point( 25, 100), new Point(125, 100),
new Point(125, 50), new Point(225, 50),
new Point(225, 100), new Point(325, 100) });
}
}
Related examples in the same category