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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
pt
PointDThe PointD that represents the upper-left corner of the drawn text.
foreColor
ColorThe 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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
pt
PointDThe PointD that represents the upper-left corner of the drawn text.
foreColor
ColorThe Color to apply to the drawn text.
backColor
ColorThe 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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
bounds
RectDThe RectD that represents the bounds of the text.
foreColor
ColorThe 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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
bounds
RectDThe RectD that represents the bounds of the text.
foreColor
ColorThe Color to apply to the drawn text.
backColor
ColorThe 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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
pt
PointDThe PointD that represents the upper-left corner of the drawn text.
foreColor
ColorThe Color to apply to the drawn text.
flags
TextFormatFlagsA 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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
pt
PointDThe PointD that represents the upper-left corner of the drawn text.
foreColor
ColorThe Color to apply to the text.
backColor
ColorThe Color to apply to the background area of the drawn text.
flags
TextFormatFlagsA 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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
bounds
RectDThe RectD that represents the bounds of the text.
foreColor
ColorThe Color to apply to the drawn text.
flags
TextFormatFlagsA 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
dc
GraphicsThe device context in which to draw the text.
text
stringThe text to draw.
font
FontThe Font to apply to the drawn text.
bounds
RectDThe RectD that represents the bounds of the text.
foreColor
ColorThe Color to apply to the text.
backColor
ColorThe Color to apply to the area represented by
bounds
.flags
TextFormatFlagsA bitwise combination of the TextFormatFlags values.