The type of pre-rendered customised texts.
Module OgamlGraphics.Text.Fx
Advanced text renderingThis module provides a more customisable way to render text through the use of iterators. This might prove more costly and also harder to use than the simple Text.t but it is much more powerful.
Iterators
The type of an iterator. The idea behind it is that
'a
is the type of objects that we manipulate (eg. Font.code
) while 'b
is the type of the value computed by the iterator. We rely here on continuation passing style to deal with this vaue at each step.
The type of a full iterator also containing its initial value and a post-treatment function, typically to forget information that was useful to the computation but is irrelevant as a value.
This creates a simple iterator that will return a constant for each value in the iterated list.
Lifts a function as map would do.
Lifts a function as mapi would do: it adds a parameter counting the number of times it has been called starting at 0.
This iterator is specific to Font.code and allows the user to lift a function taking words instead of characters. It splits strings on blank spaces, hence the requirement for their value as second argument.
Creates a drawable text with strongly customisable parameters.
Draws a Fx.t.
The global advance of the text. Basically it is a vector such that if you add it to the position of text object, you get the position of the next character you would draw.
Returns a rectangle containing all the text.