Draw one line of text with its top left at (x, y) and return its width in points.
- ui: the UI whose display list gets the glyphs.
- x: left edge of the line.
- y: top edge of the line.
- text: the UTF-8 text. Control characters other than tab are skipped.
- style: font, size and colour.
draw_text :: (
ui: *UI_State,
x: float,
y: float,
text: string,
style: Text_Style
) -> float
Draw one line of text with its top left at (x, y) and return its width in points.
Parameters
- ui: *UI_State
- the UI whose display list gets the glyphs.
- x: float
- left edge of the line.
- y: float
- top edge of the line.
- text: string
- the UTF-8 text. Control characters other than tab are skipped.
- style: Text_Style
- font, size and colour.
Returns
- float