comparison src/shapes.h @ 33:d82749f77108

Fix bug of demo and remove *_fill() and *_stroke(). - logical error in X_main.c.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 06 Aug 2008 00:40:04 +0800
parents e06a4a667ce2
children 581a03196093
comparison
equal deleted inserted replaced
32:69c8e264890d 33:d82749f77108
8 * 8 *
9 * A shape must include 9 * A shape must include
10 * - *_new() and *_free() 10 * - *_new() and *_free()
11 * - *_transform() 11 * - *_transform()
12 * - *_draw() 12 * - *_draw()
13 * - *_fill()
14 * - *_stroke()
15 * - struct of shape must include an shape_t as type of first member. 13 * - struct of shape must include an shape_t as type of first member.
16 */ 14 */
17 15
18 /* TODO: remove *_fill() and *_stroke() */
19 16
20 extern void sh_path_free(shape_t *path); 17 extern void sh_path_free(shape_t *path);
21 extern shape_t *sh_path_new(char *data); 18 extern shape_t *sh_path_new(char *data);
22 extern void sh_path_transform(shape_t *shape); 19 extern void sh_path_transform(shape_t *shape);
23 extern void sh_path_draw(shape_t *shape, cairo_t *cr); 20 extern void sh_path_draw(shape_t *shape, cairo_t *cr);
24 extern void sh_path_fill(shape_t *shape, cairo_t *cr);
25 extern void sh_path_stroke(shape_t *shape, cairo_t *cr);
26 21
27 22
28 extern void sh_text_free(shape_t *text); 23 extern void sh_text_free(shape_t *text);
29 extern shape_t *sh_text_new(const char *txt, co_aix x, co_aix y, 24 extern shape_t *sh_text_new(const char *txt, co_aix x, co_aix y,
30 co_aix font_size, cairo_font_face_t *face); 25 co_aix font_size, cairo_font_face_t *face);
31 extern void sh_text_transform(shape_t *shape); 26 extern void sh_text_transform(shape_t *shape);
32 extern void sh_text_draw(shape_t *shape, cairo_t *cr); 27 extern void sh_text_draw(shape_t *shape, cairo_t *cr);
33 extern void sh_text_fill(shape_t *shape, cairo_t *cr);
34 extern void sh_text_stroke(shape_t *shape, cairo_t *cr);
35 28
36 29
37 #endif /* __SHAPES_H_ */ 30 #endif /* __SHAPES_H_ */