# HG changeset patch # User Thinker K.F. Li # Date 1248850714 -28800 # Node ID 9d5506968efb316fc49c65024ed1639e185dc605 # Parent c3faebaec0c4d4bc7b52a5630951da47a3006616 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. diff -r c3faebaec0c4 -r 9d5506968efb include/mb_shapes.h --- a/include/mb_shapes.h Wed Jul 29 14:58:31 2009 +0800 +++ b/include/mb_shapes.h Wed Jul 29 14:58:34 2009 +0800 @@ -294,8 +294,8 @@ } mb_style_blk_t; extern shape_t *rdman_shape_stext_new(redraw_man_t *rdman, - co_aix x, co_aix y, - const char *txt); + const char *txt, + co_aix x, co_aix y); extern void sh_stext_transform(shape_t *shape); extern void sh_stext_draw(shape_t *shape, cairo_t *cr); extern int sh_stext_set_text(shape_t *shape, const char *txt); diff -r c3faebaec0c4 -r 9d5506968efb src/shape_stext.c --- 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;