insightdock::charts::Font::draw_text

Draw text into an image buffer.

Synopsis

Declared in <insightdock/font.h>
void
draw_text(
    ImageBuffer& buffer,
    float x,
    float y,
    std::string const& text,
    Color const& color,
    TextAlign align = TextAlign::Left,
    TextBaseline baseline = TextBaseline::Alphabetic) const;

Parameters

Name Description
buffer Target RGBA buffer.
x Anchor X in pixels.
y Anchor Y in pixels.
text UTF-8 string. Code points the font lacks are drawn as ?.
color Text color (alpha blended).
align Horizontal alignment.
baseline Vertical alignment.

Created with MrDocs