Draws text in the specified rectangle taking into account its line breaks and justification.
Namespace: Aurigma.GraphicsMill.Drawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub DrawText ( _ s As String, _ font As Font, _ brush As SolidBrush, _ rect As Rectangle, _ clipping As Boolean, _ tabSize As Integer _ ) |
| C# |
|---|
public void DrawText ( string s, Font font, SolidBrush brush, Rectangle rect, bool clipping, int tabSize ) |
| Visual C++ |
|---|
public: void DrawText ( String^ s, Font^ font, SolidBrush^ brush, Rectangle rect, bool clipping, int tabSize ) |
Parameters
- s
- Multiline text to draw.
- font
- Font object specifying text rendering options.
- brush
- SolidBrush object containing font color.
- rect
- Destination rectangle.
- clipping
- Value specifying whether to clip the text when it does not fit the bounding rectangle. If this value is false all the lines of the text will be rendered regardless of the destination rectangle.
- tabSize
- Value which specifies the number of whitespaces to replace one tabulation character in the text.
Remarks
All the coordinates are measured in units specified with Unit property. If the destination rectangle width is 0 the text will not be wrapped during the drawing. The extent of the text drawn by this method can be measured using the Font.MeasureText method.
The DrawText method supports newline (\n in C# and vbNewLine in VB) and tabulation (\t in C# and vbTab in VB) characters. It makes the characters after the newline symbol be displayed in a new line and replaces the tabulation character with the specified number of whitespaces.