Handbook
Glossary
draw-string ( font string -- )
Factor handbook
»
UI framework
»
Implementing new gadgets
»
Customizing gadget appearance
»
Implementing custom drawing logic
»
Rendering text
Prev:
string-dim ( font string -- dim )
Vocabulary
ui
.
text
.
private
Inputs
font
a
font
string
a
string
Outputs
None
Generic word contract
Draws a line of text.
Definition
USING:
assocs
kernel
namespaces
opengl.textures
ui.gadgets.worlds
ui.text
;
IN:
ui.text.private
:
draw-string
( font string -- )
dup
string-empty?
[
2drop
]
[
world
get
world-text-handle
[
string>image
<texture>
]
2cache
draw-texture
]
if
;