Meet us at PRINT 19. Chicago, IL. Oct. 3 - 5.

Graphics.FillRectangle Method (Brush, RectangleF)

Fills the interior of a rectangle specified by a RectangleF structure.

Namespace: Aurigma.GraphicsMill.AdvancedDrawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public void FillRectangle(
	Brush brush,
	RectangleF rectangle
)

Parameters

brush

Type: Aurigma.GraphicsMill.AdvancedDrawing.Brush

A Brush that determines the characteristics of the fill.
rectangle

Type: System.Drawing.RectangleF

Remarks

To draw an outlined rectangle, use DrawRectangle(Pen, RectangleF) method.

Examples

C#
using (var bitmap = new Bitmap(80, 80, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    graphics.FillRectangle(new SolidBrush(RgbColor.DeepPink), new System.Drawing.Rectangle(10, 10, 60, 60));
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference

Manual