diff src/shape_stext.c @ 429:9d5506968efb

Change the interface of rdman_shape_stext_new(). It had better to put text as 2nd argument after rdman. Since, text content is more meaningful than x, y position for a text object.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 29 Jul 2009 14:58:34 +0800
parents 8f900da42eed
children 099941c3becf
line wrap: on
line diff
--- a/src/shape_stext.c	Wed Jul 29 14:58:31 2009 +0800
+++ b/src/shape_stext.c	Wed Jul 29 14:58:34 2009 +0800
@@ -387,8 +387,8 @@
     free(txt_o);
 }
 
-shape_t *rdman_shape_stext_new(redraw_man_t *rdman, co_aix x, co_aix y,
-		      const char *txt) {
+shape_t *rdman_shape_stext_new(redraw_man_t *rdman, const char *txt,
+			       co_aix x, co_aix y) {
     sh_stext_t *txt_o;
 
     ASSERT(txt != NULL);
@@ -812,7 +812,7 @@
     int r;
 
     txt_o = (sh_stext_t *)rdman_shape_stext_new((redraw_man_t *)NULL,
-						10, 15, "Hello World");
+						"Hello World", 10, 15);
     CU_ASSERT(txt_o != NULL);
 
     aggr = txt_o->shape.aggr;
@@ -861,7 +861,7 @@
     area_t *area;
     int r;
 
-    txt_o = (sh_stext_t *)rdman_shape_stext_new(NULL, 100, 50, "hello world");
+    txt_o = (sh_stext_t *)rdman_shape_stext_new(NULL, "hello world", 100, 50);
     CU_ASSERT(txt_o != NULL);
 
     aggr = txt_o->shape.aggr;
@@ -907,7 +907,7 @@
     area_t *area;
     int r;
 
-    txt_o = (sh_stext_t *)rdman_shape_stext_new(NULL, 100, 50, "hello world");
+    txt_o = (sh_stext_t *)rdman_shape_stext_new(NULL, "hello world", 100, 50);
     CU_ASSERT(txt_o != NULL);
     
     aggr = txt_o->shape.aggr;