GraphicsPath path = new GraphicsPath(); Font font = new Font("Arial", 16, FontStyle.Bold, GraphicsUnit.Pixel); RectangleF rect = new RectangleF(50, 50, 200, 50); StringFormat format = new StringFormat(); path.AddString("Hello World", font.FontFamily, (int)font.Style, font.Size, rect, format);
GraphicsPath path = new GraphicsPath(); path.AddEllipse(50, 50, 100, 75);The System.Drawing.Drawing2D namespace is the package library for this example.