Canvas.DrawText Method (String, Point, Font, Fill) |
Draw a single line text string onto this canvas specifying the upper left corner position.
Namespace:
Atalasoft.Imaging.Drawing
Assembly:
Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntaxpublic Size DrawText(
string text,
Point position,
Font font,
Fill foreColor
)
Public Function DrawText (
text As String,
position As Point,
font As Font,
foreColor As Fill
) As Size
Parameters
- text
- Type: System.String
The text string to draw. - position
- Type: System.Drawing.Point
The position of the upper left corner of the text rectangle to draw. - font
- Type: System.Drawing.Font
The text font. - foreColor
- Type: Atalasoft.Imaging.Drawing.Fill
The text fill.
Return Value
Type:
Size The actual size of the text drawn.
Remarks By default, text is drawn relative to the system DPI. To draw text relative to another DPI, such as the
image DPI, see the
ScaleToDpi property of
TextFormat.
See Also