---
title: "TextAlignment Enumeration"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_TextAlignment.htm
archived: false
applies_to:
  - product: "Graphics Mill"
    versions: ["12.1", "6.x-12.x (may differ)"]
    entity_id: "https://www.graphicsmill.com/#software-application"
---

# TextAlignment Enumeration

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Specifies text alignment (left, center, or right for horizontal text; top, center, or bottom for vertical text).
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public enum TextAlignment
```
 
## Members

 |  Member name |  Description |
| --- | --- |
 |  Center |  Aligns horizontal or vertical text to the center. |
 |  Justification |  Distributes horizontal or vertical text along the text area. |
 |  JustificationLastCenter |  Distributes horizontal or vertical text along the text area, centering the last line. |
 |  JustificationLastLeft |  Distributes horizontal or vertical text along the text area, aligning the last line to the left. |
 |  JustificationLastRight |  Distributes horizontal or vertical text along the text area, aligning the last line to the right. |
 |  Left |  Aligns horizontal text to the left side. |
 |  Right |  Aligns horizontal text to the right side. |
 
## Remarks
  
Alignment of each text is performed relatively to its location.
 
## Examples
  
```csharp
using (var bitmap = new Bitmap(130, 100, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetGraphics())
{
    var boundedText = new BoundedText("Bounded Text", graphics.CreateFont("Arial", 28), new System.Drawing.RectangleF(20, 10, 110, 90));
    boundedText.ParagraphStyle.Alignment = TextAlignment.Right;
    graphics.DrawText(boundedText);
    bitmap.Save(@"Images\Output\out.png");
}
```
   
## See Also

### Reference

- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)

### Manual

- [Drawing Simple Text Objects](https://www.graphicsmill.com/docs/gm/advanced-drawing-text.htm.md)
