Mercurial > MadButterfly
annotate src/shapes.h @ 34:07c523c799f4
Fix bug of relative path command
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 06 Aug 2008 01:10:32 +0800 |
parents | d82749f77108 |
children | 581a03196093 |
rev | line source |
---|---|
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 #ifndef __SHAPES_H_ |
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 #define __SHAPES_H_ |
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 |
12 | 4 #include <cairo.h> |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 #include "mb_types.h" |
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
6 |
27 | 7 /* Define a shape |
8 * | |
9 * A shape must include | |
10 * - *_new() and *_free() | |
11 * - *_transform() | |
30
e06a4a667ce2
Accept mouse/pointer event and hint the shape that the pointer is over.
Thinker K.F. Li <thinker@branda.to>
parents:
27
diff
changeset
|
12 * - *_draw() |
27 | 13 * - struct of shape must include an shape_t as type of first member. |
14 */ | |
15 | |
30
e06a4a667ce2
Accept mouse/pointer event and hint the shape that the pointer is over.
Thinker K.F. Li <thinker@branda.to>
parents:
27
diff
changeset
|
16 |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
17 extern void sh_path_free(shape_t *path); |
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
18 extern shape_t *sh_path_new(char *data); |
12 | 19 extern void sh_path_transform(shape_t *shape); |
30
e06a4a667ce2
Accept mouse/pointer event and hint the shape that the pointer is over.
Thinker K.F. Li <thinker@branda.to>
parents:
27
diff
changeset
|
20 extern void sh_path_draw(shape_t *shape, cairo_t *cr); |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
21 |
27 | 22 |
23 extern void sh_text_free(shape_t *text); | |
24 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); | |
26 extern void sh_text_transform(shape_t *shape); | |
30
e06a4a667ce2
Accept mouse/pointer event and hint the shape that the pointer is over.
Thinker K.F. Li <thinker@branda.to>
parents:
27
diff
changeset
|
27 extern void sh_text_draw(shape_t *shape, cairo_t *cr); |
27 | 28 |
29 | |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
30 #endif /* __SHAPES_H_ */ |