diff 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
line wrap: on
line diff
--- a/src/shapes.h	Wed Aug 06 01:10:32 2008 +0800
+++ b/src/shapes.h	Wed Aug 06 02:11:53 2008 +0800
@@ -8,9 +8,15 @@
  *
  * A shape must include
  * - *_new() and *_free()
+ *   - clear memory for shape_t member.
  * - *_transform()
  * - *_draw()
  * - struct of shape must include an shape_t as type of first member.
+ * 
+ * Must modify
+ * - event.c:draw_shape_path
+ * - redraw_man.c:clean_shape
+ * - redraw_man.c:draw_shape
  */
 
 
@@ -26,5 +32,10 @@
 extern void sh_text_transform(shape_t *shape);
 extern void sh_text_draw(shape_t *shape, cairo_t *cr);
 
+extern shape_t *sh_rect_new(co_aix x, co_aix y, co_aix w, co_aix h,
+			    co_aix rx, co_aix ry);
+extern void sh_rect_free(shape_t *shape);
+extern void sh_rect_transform(shape_t *shape);
+extern void sh_rect_draw(shape_t *shape, cairo_t *cr);
 
 #endif /* __SHAPES_H_ */