changeset 40:e292beec12d4

-
author Thinker K.F. Li <thinker@branda.to>
date Wed, 06 Aug 2008 21:34:53 +0800
parents db2aa914e14b
children 400b4b5db0dc
files src/shape_rect.c src/shapes.h
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/shape_rect.c	Wed Aug 06 21:05:11 2008 +0800
+++ b/src/shape_rect.c	Wed Aug 06 21:34:53 2008 +0800
@@ -37,6 +37,18 @@
     free(shape);
 }
 
+void sh_rect_set(shape_t *shape, co_aix x, co_aix y,
+		 co_aix w, co_aix h, co_aix rx, co_aix ry) {
+    sh_rect_t *rect = (sh_rect_t *)shape;
+
+    rect->x = x;
+    rect->y = y;
+    rect->w = w;
+    rect->h = h;
+    rect->rx = rx;
+    rect->ry = ry;
+}
+
 void sh_rect_transform(shape_t *shape) {
     sh_rect_t *rect = (sh_rect_t *)shape;
     co_aix x, y, w, h, rx, ry;
--- a/src/shapes.h	Wed Aug 06 21:05:11 2008 +0800
+++ b/src/shapes.h	Wed Aug 06 21:34:53 2008 +0800
@@ -37,5 +37,7 @@
 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);
+extern void sh_rect_set(shape_t *shape, co_aix x, co_aix y,
+			co_aix w, co_aix h, co_aix rx, co_aix ry);
 
 #endif /* __SHAPES_H_ */