TextAlignment Enumeration

Specifies text alignment (left, center, or right for horizontal text; top, center, or bottom for vertical text).

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

Syntax

C#
public enum TextAlignment

Members

Member name Description
Bottom

Aligns vertical text to the bottom.

Center

Aligns horizontal or vertical text to the center.

Justification

Distributes horizontal or vertical text along the text area.

Left

Aligns horizontal text to the left side.

Right

Aligns horizontal text to the right side.

Top

Aligns vertical text to the top.

Remarks

Alignment of each text is performed relatively to its location.

Examples

C#
using (var bitmap = new Bitmap(130, 100, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    var boundedText = new BoundedText("Bounded Text", graphics.CreateFont("Arial", 28), new System.Drawing.RectangleF(20, 10, 110, 90));
    boundedText.Alignment = TextAlignment.Right;
    graphics.DrawText(boundedText);
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference

Manual