xtd 0.2.0
Loading...
Searching...
No Matches

◆ draw_label()

static void xtd::forms::label_renderer::draw_label ( const xtd::forms::style_sheets::style_sheet style_sheet,
xtd::drawing::graphics graphics,
const xtd::drawing::rectangle bounds,
xtd::forms::visual_styles::label_state  label_state,
const std::optional< xtd::drawing::color > &  back_color,
const xtd::string text,
const std::optional< xtd::forms::content_alignment > &  text_align,
const std::optional< xtd::drawing::color > &  fore_color,
const std::optional< xtd::drawing::font > &  font,
const xtd::drawing::image image,
const std::optional< xtd::forms::content_alignment > &  image_align,
const std::optional< xtd::forms::border_style > &  border,
xtd::forms::border_sides  sides,
const std::vector< xtd::forms::shadow > &  shadows,
bool  auto_ellipsis 
)
static

Draws a box in the specified bounds, label style, label state and background color.

Parameters
style_sheetThe xtd::forms::style_sheets::style_sheet used to draw a label.
graphicsThe xtd::drawing::graphics used to draw a label.
boundsThe xtd::drawing::rectangle that specifies the bounds of the label.
label_stateThe visual state of a label that is drawn with visual styles.
back_colorThe background color for the label control.
textThe text of the label control.
text_flagsContains the display and layout information for text strings.
fore_colorThe foreground color for the label control.
fontThe font of the text for the label control.
imageThe image of the label control.
image_alignContains the display and layout information for image .
borderContains the border style for the control
sideContains the border sides for the control.
shadowsAn xtd::forms::shadow array used to draw shadows under the text.
auto_ellipsisThe value indicating whether the ellipsis character (...) appears at the right edge of the xtd::forms::label, denoting that the xtd::forms::label text extends beyond the specified length of the xtd::forms::label.
Remarks
The parameter back_color is set only if they are different from its default value; otherwise std::nullopt.