Method DrawLabel
DrawLabel(ReadOnlySpan<char>, Font, Color, Color, Image?, RectD, HVAlignment?, int)
Draws text with the specified font, background and foreground colors, optional image, alignment and underlined mnemonic character.
public virtual RectD DrawLabel(ReadOnlySpan<char> text, Font font, Color foreColor, Color backColor, Image? image, RectD rect, HVAlignment? alignment = null, int indexAccel = -1)
Parameters
textReadOnlySpan<char>Text to draw.
fontFontFont used to draw the text.
foreColorColorForeground color of the text.
backColorColorBackground color of the text. If parameter is equal to Empty, background will not be painted.
imageImageOptional image.
rectRectDRectangle in which drawing is performed.
alignmentHVAlignment?Alignment of the text.
indexAccelintIndex of underlined mnemonic character.
Returns
- RectD
The bounding rectangle.
DrawLabel(ref DrawLabelParams)
Draws text with the specified font, background and foreground colors, optional image, alignment and underlined mnemonic character.
public virtual RectD DrawLabel(ref Graphics.DrawLabelParams prm)
Parameters
prmGraphics.DrawLabelParamsParameters specified using Graphics.DrawLabelParams structure.