Mercurial > MadButterfly
comparison src/shapes.h @ 35:581a03196093
Support rectangle tag of SVG.
- Change rectangle in X_main to sh_rect_t.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 06 Aug 2008 02:11:53 +0800 |
parents | d82749f77108 |
children | e292beec12d4 |
comparison
equal
deleted
inserted
replaced
34:07c523c799f4 | 35:581a03196093 |
---|---|
6 | 6 |
7 /* Define a shape | 7 /* Define a shape |
8 * | 8 * |
9 * A shape must include | 9 * A shape must include |
10 * - *_new() and *_free() | 10 * - *_new() and *_free() |
11 * - clear memory for shape_t member. | |
11 * - *_transform() | 12 * - *_transform() |
12 * - *_draw() | 13 * - *_draw() |
13 * - struct of shape must include an shape_t as type of first member. | 14 * - struct of shape must include an shape_t as type of first member. |
15 * | |
16 * Must modify | |
17 * - event.c:draw_shape_path | |
18 * - redraw_man.c:clean_shape | |
19 * - redraw_man.c:draw_shape | |
14 */ | 20 */ |
15 | 21 |
16 | 22 |
17 extern void sh_path_free(shape_t *path); | 23 extern void sh_path_free(shape_t *path); |
18 extern shape_t *sh_path_new(char *data); | 24 extern shape_t *sh_path_new(char *data); |
24 extern shape_t *sh_text_new(const char *txt, co_aix x, co_aix y, | 30 extern shape_t *sh_text_new(const char *txt, co_aix x, co_aix y, |
25 co_aix font_size, cairo_font_face_t *face); | 31 co_aix font_size, cairo_font_face_t *face); |
26 extern void sh_text_transform(shape_t *shape); | 32 extern void sh_text_transform(shape_t *shape); |
27 extern void sh_text_draw(shape_t *shape, cairo_t *cr); | 33 extern void sh_text_draw(shape_t *shape, cairo_t *cr); |
28 | 34 |
35 extern shape_t *sh_rect_new(co_aix x, co_aix y, co_aix w, co_aix h, | |
36 co_aix rx, co_aix ry); | |
37 extern void sh_rect_free(shape_t *shape); | |
38 extern void sh_rect_transform(shape_t *shape); | |
39 extern void sh_rect_draw(shape_t *shape, cairo_t *cr); | |
29 | 40 |
30 #endif /* __SHAPES_H_ */ | 41 #endif /* __SHAPES_H_ */ |