Graphics.FillPath Method

Draws a path defined by a Path instance.

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

Syntax

C#
public void FillPath(
	Brush brush,
	Path path
)

Parameters

brush

Type: Aurigma.GraphicsMill.AdvancedDrawing.Brush

A Brush that determines the characteristics of the fill.
path

Type: Aurigma.GraphicsMill.AdvancedDrawing.Path

A Path to draw.

Remarks

A path is a set of geometric elements (curves, text, and graphics shapes) that can be used as a single object. Paths can be used different operations: drawing outlined or filled path, drawing a text string along a path, and cropping an image.

To outline the path, use DrawPath(Pen, Path) method.

Examples

C#
using (var bitmap = new Bitmap(170, 160, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
using (var path = new Path())
{
    path.DrawRectangle(new System.Drawing.RectangleF(75, 75, 75, 35));
    graphics.DrawPath(new Pen(RgbColor.Green), path);
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference

Manual