Draws a rectangle specified by a RectangleF structure.
Namespace:
Aurigma.GraphicsMill.AdvancedDrawing
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public void DrawRectangle( Pen pen, RectangleF rectangle )
Type: Aurigma.GraphicsMill.AdvancedDrawing.Pen
A Pen that determines the color, width, and style of the rectangle.Type: System.Drawing.RectangleF
To fill a rectangle, use FillRectangle(Brush, RectangleF) method.
using (var bitmap = new Bitmap(80, 80, PixelFormat.Format24bppRgb, RgbColor.White)) using (var graphics = bitmap.GetAdvancedGraphics()) { graphics.DrawRectangle(new Pen(RgbColor.Blue), new System.Drawing.Rectangle(10, 10, 60, 60)); bitmap.Save(@"Images\Output\out.png"); }