Draw text into an image buffer.
<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;
| 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. |