PathText Constructor (String, Font, Brush, Path)

Initializes a new instance of the PathText class with the specified settings.

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

Syntax

C#
public PathText(
	string text,
	Font font,
	Brush brush,
	Path path
)

Parameters

text

Type: System.String

A string to draw.
font

Type: Aurigma.GraphicsMill.AdvancedDrawing.Font

Defines the font characteristics of the text.
brush

Type: Aurigma.GraphicsMill.AdvancedDrawing.Brush

SolidBrush determining the color of the drawn text.
path

Type: Aurigma.GraphicsMill.AdvancedDrawing.Path

Path specifying the curve along which the the text locates.

Examples

C#
using (var bitmap = new Bitmap(200, 80, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
using (var path = new Path())
{
    path.MoveTo(10, 60);
    path.CurveTo(85, 20, 175, 60);
    var distortedText = new PathText("Distorted Text", graphics.CreateFont("Arial", 28), new SolidBrush(RgbColor.Black), path);
    graphics.DrawText(distortedText);
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference