Handbook
Glossary
draw-hello-world ( gadget -- )
Vocabulary
cairo-demo
.
private
Inputs
gadget
an
object
Outputs
None
Definition
USING:
accessors
cairo-demo
cairo.ffi
combinators
kernel
math
math.constants
;
IN:
cairo-demo.private
:
draw-hello-world
( gadget -- )
cairo-t>>
[
no-cairo-t
]
unless*
{
[
"Sans"
CAIRO_FONT_SLANT_NORMAL
CAIRO_FONT_WEIGHT_BOLD
cairo_select_font_face
]
[
90.0
cairo_set_font_size
]
[
10.0 135.0
cairo_move_to
]
[
"Hello"
cairo_show_text
]
[
70.0 165.0
cairo_move_to
]
[
"World"
cairo_text_path
]
[
0.5 0.5 1
cairo_set_source_rgb
]
[
cairo_fill_preserve
]
[
0 0 0
cairo_set_source_rgb
]
[
2.56
cairo_set_line_width
]
[
cairo_stroke
]
[
1 0.2 0.2 0.6
cairo_set_source_rgba
]
[
10.0 135.0 5.12 0
pi
2
*
cairo_arc
]
[
cairo_close_path
]
[
70.0 165.0 5.12 0
pi
2
*
cairo_arc
]
[
cairo_fill
]
}
cleave
;