xtd 0.2.0

◆ draw_string() [1/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 
)

Draws the specified text string at the specified rectangle with the specified xtd::drawing::brush and xtd::drawing::font objects.

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.
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. To further manipulate how the string is drawn inside the rectangle use the xtd::drawing::graphics::draw_string overload that takes a xtd::drawing::string_format.
Examples
graphics.cpp, and hello_world_png.cpp.