public void DrawPath(Pen pen, GraphicsPath path) { if (pen == null) throw new ArgumentNullException ("pen"); if (path == null) throw new ArgumentNullException ("path"); PlotPath (path); StrokePen (pen); }
public static void DrawRoundRectangle(Graphics g, Pen pen, Rectangle rect, int cornerRadius) { using (GraphicsPath path = CreateRoundedRectanglePath(rect, cornerRadius)) { g.DrawPath(pen, path); } }