package graphv_gles2_native
Module Graphv_gles2_native.TextSource
Module for text rendering. Text is rendered using a glyph bitmap. The default bitmap size is 2048x2048. It is possible to run out of space in this bitmap so try to be conservative with font sizes and number of fonts. Glyphs are grouped by font, size, and blur. A glyph will be rendered once per combination of properties.
Draw a text substring with the current font at the specified location.
Same as text except it returns the rendered length.
Set the font size in pixel units. Warning: If this font size has not been used yet the glyphs will be generated on demand. This may cause a performance hit on the first rendering at this size. Try to avoid using many different sizes.
Set the alignment for rendered text. This changes the x,y origin for the rendered text.
val break_lines :
t ->
break_width:float ->
max_rows:int ->
?start:int ->
?end_:int ->
lines:text_row array ->
string ->
intLayout lines of text in break_width size rows.
Helper function to initialize an empty array of rows
Used to get glyph positions within a rendered string. Can be used for selections or other screen based picking.
A glyph_position initialized to all zeros.
val glyph_positions :
t ->
x:float ->
y:float ->
?start:int ->
?end_:int ->
glyphs:glyph_position array ->
string ->
int