Handbook
Glossary
utf8-gadget
Vocabulary
cairo-samples
Definition
USING:
cairo-gadgets
;
IN:
cairo-samples
TUPLE:
utf8-gadget
<
cairo-gadget
;
Methods
USING:
accessors
cairo-gadgets
cairo-samples
cairo.ffi
classes.struct
kernel
libc
math
;
M:
utf8-gadget
render-cairo*
drop
cr
"Sans"
CAIRO_FONT_SLANT_NORMAL
CAIRO_FONT_WEIGHT_NORMAL
cairo_select_font_face
cr
50
cairo_set_font_size
cairo_text_extents_t
malloc-struct
cr
"日本語"
pick
cairo_text_extents
cr
over
[
width>>
2
/
]
[
x_bearing>>
]
bi
+
128
swap
-
pick
[
height>>
2
/
]
[
y_bearing>>
]
bi
+
128
swap
-
cairo_move_to
free
cr
"日本語"
cairo_show_text
cr
1 0.2 0.2 0.6
cairo_set_source_rgba
cr
6
cairo_set_line_width
cr
128 0
cairo_move_to
cr
0 256
cairo_rel_line_to
cr
0 128
cairo_move_to
cr
256 0
cairo_rel_line_to
cr
cairo_stroke
;