Simp module

draw_text

procedure · 1 overloadSource

Draws text in one line and returns its width in pixels.

draw_text :: (
    font: *Dynamic_Font,
    x: s64,
    y: s64,
    text: string,
    color := Vector4.{ 1, 1, 1, 1 },
    effects: Font_Effects = 0
) -> width: s64

Draws text in one line and returns its width in pixels.

Parameters

font: *Dynamic_Font
a font from load_font.
x: s64
where the text starts, in the units of the render target.
y: s64
the baseline of the text.
text: string
UTF-8.
color := Vector4.{ 1, 1, 1, 1 }
white by default.
effects: Font_Effects
Font_Effects flags.

Returns

width: s64

See also