Scenic.Primitive.Text (Scenic v0.11.0-beta.0) View Source
Draw text on the screen.
Data
text
The data for a Text primitive is a bitstring
text
- the text to draw
Styles
This primitive recognizes the following styles
hidden
- show or hide the primitivefill
- fill in the area of the text. Only solid colors!font
- name (or key) of font to usefont_size
- point size of the fontfont_blur
- option to blur the characterstext_align
- alignment of lines of texttext_height
- spacing between lines of text
Usage
You should add/modify primitives via the helper functions in
Scenic.Primitives
graph
|> text( "Some example text", fill: :green, font: :roboto_mono, font_size: 64 )
Link to this section Summary
Functions
Returns a list of styles recognized by this primitive.
Link to this section Types
Specs
styles_t() :: [ :hidden | :scissor | :font | :font_size | :line_height | :text_align | :text_base | :line_height ]
Specs
t() :: String.t()
Link to this section Functions
Specs
valid_styles() :: styles_t()
Returns a list of styles recognized by this primitive.