- Aurigma Graphics Mill 5.5 for .NET
- Introduction
- What's New?
- Overview of Features
- Getting Started
- Programming with Graphics Mill for .NET
- File Formats
- Graphics Mill for .NET Add-ons
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- Aurigma.GraphicsMill.AjaxControls Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Brush Class
- BrushType Enumeration
- Charset Enumeration
- Font Class
- GdiGraphics Class
- GdiGraphics Members
- GdiGraphics Constructor
- GdiGraphics Methods
- {dtor} Method
- Clear Method
- Dispose Method
- DrawArc Method
- DrawBezier Method
- DrawBeziers Method
- DrawEllipse Method
- DrawFormattedText Method
- DrawImage Method
- DrawLine Method
- DrawLines Method
- DrawPie Method
- DrawPolygon Method
- DrawRectangle Method
- DrawString Method
- DrawText Method
- DrawText Method (String, Font, SolidBrush, Rectangle, Boolean, Int32)
- DrawText Method (String, Font, SolidBrush, RectangleF, Boolean, Int32)
- DrawText Method (String, Font, SolidBrush, Int32, Int32, Int32, Int32, Boolean, Int32)
- DrawText Method (String, Font, SolidBrush, Single, Single, Single, Single, Boolean, Int32)
- ExcludeClip Method
- FillEllipse Method
- FillPie Method
- FillPolygon Method
- FillRectangle Method
- FloodFill Method
- FromHdc Method
- FromHwnd Method
- GetHdc Method
- GetPixel Method
- IntersectClip Method
- Lock Method
- ResetClip Method
- SetClip Method
- SetPixel Method
- TranslateClip Method
- Unlock Method
- GdiGraphics Properties
- GdiGraphicsMode Enumeration
- HatchBrush Class
- HatchStyle Enumeration
- HorizontalAlignment Enumeration
- LineCap Enumeration
- Pen Class
- SolidBrush Class
- TextTrimmingMode Enumeration
- VerticalAlignment Enumeration
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Aurigma.GraphicsMill.WebControls Namespace
- Aurigma.GraphicsMill.WinControls Namespace
- GraphicsMill Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace (Client Class Library)
- Samples
- Licensing
- Copyright Notices
GdiGraphics.DrawText Method (String, Font, SolidBrush, Int32, Int32, Int32, Int32, Boolean, Int32)
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
Public Sub DrawText ( _
s As String, _
font As Font, _
brush As SolidBrush, _
x As Integer, _
y As Integer, _
width As Integer, _
height As Integer, _
clipping As Boolean, _
tabSize As Integer _
)
public void DrawText(
string s,
Font font,
SolidBrush brush,
int x,
int y,
int width,
int height,
bool clipping,
int tabSize
)
Parameters
- s
-
Type: System.String
Multiline text to draw.
- font
-
Type: Aurigma.GraphicsMill.Drawing.Font
Font object specifying text rendering options.
- brush
-
Type: Aurigma.GraphicsMill.Drawing.SolidBrush
SolidBrush object containing font color.
- x
-
Type: System.Int32
X-coordinate of the left top corner of the destination rectangle.
- y
-
Type: System.Int32
Y-coordinate of the left top corner of the destination rectangle.
- width
-
Type: System.Int32
Width of the destination rectangle.
- height
-
Type: System.Int32
Height of the destination rectangle.
- clipping
-
Type: System.Boolean
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
-
Type: System.Int32
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.
If you draw text on indexed bitmaps, antialiasing is disabled regardless to the Antialiased property value. Also, if the GdiGraphics was created on the base of the Bitmap which has Format8bppGrayScale pixel format, antialiasing will not be applied for text output. The reason of this issue is that GDI does not support grayscale bitmaps. That's why Graphics Mill for .NET represents this image as Format8bppIndexed bitmap with grayscale palette.