PlainText Constructor (String, Font, PointF)

Initializes a new instance of the PlainText object with the specified Font and baseline coordinates.

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

Syntax

C#
public PlainText(
	string text,
	Font font,
	PointF position
)

Parameters

text

Type: System.String

A string to draw.
font

Type: Aurigma.GraphicsMill.AdvancedDrawing.Font

Defines the font characteristics of the text.
position

Type: System.Drawing.PointF

The starting point of the baseline.

Examples

C#
using (var bitmap = new Bitmap(200, 80, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    var plainText = new PlainText("Plain Text", graphics.CreateFont("Arial", 28), new System.Drawing.PointF(20, 40));
    graphics.DrawText(plainText);
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference