public void DrawLine(Pen pen, float x1, float y1, float x2, float y2) { if (pen == null) throw new ArgumentNullException ("pen"); MoveTo (x1, y1); LineTo (x2, y2); StrokePen (pen); }
public void Draw(Graphics g) { Pen p = new Pen(Color.Green, 1f); g.DrawLine(p, 0, height / 2, width, height / 2); g.DrawLine(p, width / 2, 0, width / 2, height); }