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

◆ draw_string() [2/6]

void xtd::drawing::graphics::draw_string ( const xtd::string s,
const xtd::drawing::font font,
const xtd::drawing::brush brush,
const xtd::drawing::rectangle_f layout_rectangle,
const xtd::drawing::string_format format 
)

Draws the specified text string at the specified rectangle with the specified xtd::drawing::brush and xtd::drawing::font objects using the formatting attributes of the specified xtd::drawing::string_format.

Parameters
sString to draw.
fontxtd::drawing::font that defines the text format of the string.
brushxtd::drawing::brush that determines the color and texture of the drawn text.
layout_rectanglextd::drawing::rectangle_f structure that specifies the location of the drawn text.
formatxtd::drawing::string_format that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Remarks
The text represented by the s parameter is drawn inside the rectangle represented by the layout_rectangle parameter. If the text does not fit inside the rectangle, it is truncated at the nearest word, unless otherwise specified with the format parameter.