xtd - Reference Guide 0.2.0
xtd::forms::label_renderer Class Reference

#include <label_renderer.h>

Definition

Provides label control renderer methods.

class forms_export_ label_renderer static_
Inheritance
xtd::static → xtd::forms::label_renderer
Namespace
xtd::forms::style_sheets
Library
xtd.forms

Static Public Member Functions

static void 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::ustring &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, bool shadow, bool auto_ellipsis)
 Draws a box in the specified bounds, label style, label state and background color. More...
 

Member Function Documentation

◆ 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::ustring 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,
bool  shadow,
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.
shadowThe value that allows to draw a drop shadow 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.

The documentation for this class was generated from the following file: