Draws a string in specified rectangle (automatically wrapping it if necessary).
Namespace:
Aurigma.GraphicsMill.Drawing
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Sub DrawString ( _ s As String, _ font As Font, _ brush As SolidBrush, _ rect As Rectangle, _ trim As TextTrimmingMode, _ hotkeyPrefix As Boolean, _ clipping As Boolean, _ wordWrap As Boolean _ )
public void DrawString( string s, Font font, SolidBrush brush, Rectangle rect, TextTrimmingMode trim, bool hotkeyPrefix, bool clipping, bool wordWrap )
Type: System.String
String to draw.Type: Aurigma.GraphicsMill.Drawing.Font
Font object specifying text rendering options.Type: Aurigma.GraphicsMill.Drawing.SolidBrush
SolidBrush object containing font color.Type: System.Drawing.Rectangle
Destination rectangle.Type: Aurigma.GraphicsMill.Drawing.TextTrimmingMode
TextTrimmingMode value specifying how to handle situation when text does not fit given rectangle (where to insert ellipsis characters).Type: System.Boolean
Value specifying if to handle hotkey prefix (ampersand sign). If true, ampersand is removed from the string and next character is underlined.Type: System.Boolean
Value specifying if to clip the string when it does not fit the bounding rectangle.Type: System.Boolean
Value specifying if to wrap the string inside the bounding rectangle.All the coordinates are measured in units specified with Unit property.
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.