Method DrawText
DrawText(Graphics, string, Font, PointD, Color)
Draws the specified text at the specified location using the specified device context, font, and color.
public static void DrawText(Graphics dc, string text, Font font, PointD pt, Color foreColor)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
ptPointDThe PointD that represents the upper-left corner of the drawn text.
foreColorColorThe Color to apply to the drawn text.
DrawText(Graphics, string, Font, PointD, Color, Color)
Draws the specified text at the specified location, using the specified device context, font, color, and back color.
public static void DrawText(Graphics dc, string text, Font font, PointD pt, Color foreColor, Color backColor)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
ptPointDThe PointD that represents the upper-left corner of the drawn text.
foreColorColorThe Color to apply to the drawn text.
backColorColorThe Color to apply to the background area of the drawn text.
DrawText(Graphics, string, Font, RectD, Color)
Draws the specified text within the specified bounds, using the specified device context, font, and color.
public static void DrawText(Graphics dc, string text, Font font, RectD bounds, Color foreColor)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
boundsRectDThe RectD that represents the bounds of the text.
foreColorColorThe Color to apply to the drawn text.
DrawText(Graphics, string, Font, RectD, Color, Color)
Draws the specified text within the specified bounds using the specified device context, font, color, and back color.
public static void DrawText(Graphics dc, string text, Font font, RectD bounds, Color foreColor, Color backColor)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
boundsRectDThe RectD that represents the bounds of the text.
foreColorColorThe Color to apply to the drawn text.
backColorColorThe Color to apply to the area represented by
bounds.
DrawText(Graphics, string, Font, PointD, Color, TextFormatFlags)
Draws the specified text at the specified location using the specified device context, font, color, and formatting instructions.
public static void DrawText(Graphics dc, string text, Font font, PointD pt, Color foreColor, TextFormatFlags flags)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
ptPointDThe PointD that represents the upper-left corner of the drawn text.
foreColorColorThe Color to apply to the drawn text.
flagsTextFormatFlagsA bitwise combination of the TextFormatFlags values.
DrawText(Graphics, string, Font, PointD, Color, Color, TextFormatFlags)
Draws the specified text at the specified location using the specified device context, font, color, back color, and formatting instructions
public static void DrawText(Graphics dc, string text, Font font, PointD pt, Color foreColor, Color backColor, TextFormatFlags flags)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
ptPointDThe PointD that represents the upper-left corner of the drawn text.
foreColorColorThe Color to apply to the text.
backColorColorThe Color to apply to the background area of the drawn text.
flagsTextFormatFlagsA bitwise combination of the TextFormatFlags values.
DrawText(Graphics, string, Font, RectD, Color, TextFormatFlags)
Draws the specified text within the specified bounds using the specified device context, font, color, and formatting instructions.
public static void DrawText(Graphics dc, string text, Font font, RectD bounds, Color foreColor, TextFormatFlags flags)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
boundsRectDThe RectD that represents the bounds of the text.
foreColorColorThe Color to apply to the drawn text.
flagsTextFormatFlagsA bitwise combination of the TextFormatFlags values.
DrawText(Graphics, string, Font, RectD, Color, Color, TextFormatFlags)
Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.
public static void DrawText(Graphics dc, string text, Font font, RectD bounds, Color foreColor, Color backColor, TextFormatFlags flags)
Parameters
dcGraphicsThe device context in which to draw the text.
textstringThe text to draw.
fontFontThe Font to apply to the drawn text.
boundsRectDThe RectD that represents the bounds of the text.
foreColorColorThe Color to apply to the text.
backColorColorThe Color to apply to the area represented by
bounds.flagsTextFormatFlagsA bitwise combination of the TextFormatFlags values.