Handbook
Glossary
draw-text ( font text -- )
Factor handbook
»
UI framework
»
Implementing new gadgets
»
Customizing gadget appearance
»
Implementing custom drawing logic
»
Rendering text
Prev:
offset>x ( n font string -- x )
Next:
string>image ( font string -- image loc )
Vocabulary
ui
.
text
Inputs
font
a
font
text
a string or an array of strings
Outputs
None
Word description
Draws a piece of text.
Definition
IN:
ui.text
GENERIC:
draw-text
( font text -- )
Methods
USING:
arrays
kernel
opengl
opengl.gl
sequences
ui.text
ui.text.private
;
M:
array
draw-text
[
[
[
draw-string
]
[
[
0.0
]
2dip
string-height
0.0
glTranslated
]
2bi
]
with
each
]
do-matrix
;
USING:
fonts
ui.text
ui.text.private
;
M:
selection
draw-text
draw-string
;
USING:
strings
ui.text
ui.text.private
;
M:
string
draw-text
draw-string
;