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

Graphics.DrawBeziers Method

Draws a sequence of Bezier curves defined by an array of PointF structures.

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

Syntax

C#
public void DrawBeziers(
	Pen pen,
	PointF[] points
)

Parameters

pen

Type: Aurigma.GraphicsMill.AdvancedDrawing.Pen

A Pen that determines the color, width, and style of the curve.
points

Type: System.Drawing.PointF[]

An array of PointF structures that represents the curves.

Remarks

A Bezier spline is defined with four points: first and last point specify beginning and end of the curve, second and third points specify so-called control points. The control points act as magnets, pulling the curve in certain directions to influence the way the Bezier spline bends.

The ending point of one spline will be the starting point of the next one. Therefore, for splines, except for the first one in the array, you need to specify three points instead of four.

Examples

C#
using (var bitmap = new Bitmap(200, 80, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    System.Drawing.PointF[] points = {
        new System.Drawing.PointF(10,  60),
        new System.Drawing.PointF(40, 20),
        new System.Drawing.PointF(70,  60),
        new System.Drawing.PointF(100, 20),
        new System.Drawing.PointF(130, 60),
        new System.Drawing.PointF(160, 20),
        new System.Drawing.PointF(190, 60)};
    graphics.DrawBeziers(new Pen(RgbColor.Black), points);
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference

Manual