package wall
Module Wall_textSource
utf8_decode r s returns the unicode codepoint starting at offset !r, advancing r to the beginning of next codepoint ot String.length s when the end is reached. If the string was not properly encoded, -1 is returned and r is advanced to hopefully resume parsing.
Source
val simple_text :
?typesetter:simple_typesetter ->
?halign:[ `LEFT | `CENTER | `RIGHT ] ->
?valign:[ `TOP | `MIDDLE | `BOTTOM | `BASELINE ] ->
Font.t ->
x:float ->
y:float ->
string ->
Wall.imagesimple_text ?frame ?halign ?valign font ~x ~y text is a shape that represents text drawn using font at position x,y.
The optionals halign and valign arguments describe how the text should be positioned w.r.t point x,y.
halign values:
`LEFT, text will start at coordinatex(xis the leftmost point)`CENTER, text will be centered aroundx`RIGHT, text will end at coordinatex(xis the rightmost point)
valign values:
`TOP, top of the text will be at coordinatey, drawing will go below`MIDDLE, text will be vertically centered at coordinatey`BOTTOM, bottom of the text will be at coordinatey, drawing will be above`BASELINE, the baseline of the text will be at coordinatey, most letters will be above but descender (as in letters such as y, p, j, q) will go below.