diff src/shapes.h @ 30:e06a4a667ce2

Accept mouse/pointer event and hint the shape that the pointer is over. - add find_shape_at_pos()
author Thinker K.F. Li <thinker@branda.to>
date Tue, 05 Aug 2008 12:40:45 +0800
parents 19c603dd6ff9
children d82749f77108
line wrap: on
line diff
--- a/src/shapes.h	Mon Aug 04 21:13:32 2008 +0800
+++ b/src/shapes.h	Tue Aug 05 12:40:45 2008 +0800
@@ -9,14 +9,18 @@
  * A shape must include
  * - *_new() and *_free()
  * - *_transform()
+ * - *_draw()
  * - *_fill()
  * - *_stroke()
  * - struct of shape must include an shape_t as type of first member.
  */
 
+/* TODO: remove *_fill() and *_stroke() */
+
 extern void sh_path_free(shape_t *path);
 extern shape_t *sh_path_new(char *data);
 extern void sh_path_transform(shape_t *shape);
+extern void sh_path_draw(shape_t *shape, cairo_t *cr);
 extern void sh_path_fill(shape_t *shape, cairo_t *cr);
 extern void sh_path_stroke(shape_t *shape, cairo_t *cr);
 
@@ -25,6 +29,7 @@
 extern shape_t *sh_text_new(const char *txt, co_aix x, co_aix y,
 			    co_aix font_size, cairo_font_face_t *face);
 extern void sh_text_transform(shape_t *shape);
+extern void sh_text_draw(shape_t *shape, cairo_t *cr);
 extern void sh_text_fill(shape_t *shape, cairo_t *cr);
 extern void sh_text_stroke(shape_t *shape, cairo_t *cr);