Graphics.DrawPath Method

Draws a path defined by a Path instance.

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

Syntax

C#
public void DrawPath(
	Pen pen,
	Path path
)

Parameters

pen

Type: Aurigma.GraphicsMill.AdvancedDrawing.Pen

A Pen that determines the color, width, and style of the path.
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 fill the path, use FillPath(Brush, 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