diff src/mbaf/mbobject.c @ 1067:7b4e80ab671a openvg

merge from default branch
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 01 Dec 2010 12:25:56 +0800
parents 152bc503dc99
children
line wrap: on
line diff
--- a/src/mbaf/mbobject.c	Mon Jul 19 15:44:49 2010 +0800
+++ b/src/mbaf/mbobject.c	Wed Dec 01 12:25:56 2010 +0800
@@ -1,5 +1,8 @@
+// -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*-
+// vim: sw=4:ts=8:sts=4
 #include "mb_types.h"
 #include "mb_obj.h"
+#include "mb_config.h"
 
 
 void mb_obj_set_pos(mb_obj_t *obj, co_aix x, co_aix y)
@@ -7,12 +10,14 @@
     if (MBO_TYPE(obj) == MBO_COORD) {
 	    coord_x(((coord_t *) obj)) = x;
 	    coord_y(((coord_t *) obj)) = y;
+#ifdef SH_TEXT
     } else if (MBO_TYPE(obj) == MBO_TEXT) {
 	    sh_text_set_pos((shape_t *) obj, x, y);
+#endif
     } else {
 	    return;
     }
-    
+
 }
 
 void mb_obj_get_pos(mb_obj_t *obj, co_aix *x, co_aix *y)
@@ -20,12 +25,14 @@
     if (MBO_TYPE(obj) == MBO_COORD) {
 	    *x = coord_x((coord_t *) obj);
 	    *y = coord_y((coord_t *) obj);
+#ifdef SH_TEXT
     } else if (MBO_TYPE(obj) == MBO_TEXT) {
 	    sh_text_get_pos((shape_t *) obj, x, y);
+#endif
     } else {
 	    return;
     }
-    
+
 }
 
 void mb_obj_set_text(mb_obj_t *obj, const char *text)
@@ -37,17 +44,21 @@
 
         FOR_COORD_MEMBERS(g, geo) {
             shape = geo_get_shape(geo);
+#ifdef SH_TEXT
             if(shape->obj.obj_type == MBO_TEXT) {
 		sh_text_set_text(shape, text);
 		return;
             }
+#endif
         }
+#ifdef SH_TEXT
     } else if (MBO_TYPE(obj) == MBO_TEXT) {
 	    sh_text_set_text((shape_t *) obj,text);
+#endif
     } else {
 	    return;
     }
-    
+
 }
 
 
@@ -60,13 +71,17 @@
 
         FOR_COORD_MEMBERS(g, geo) {
             shape = geo_get_shape(geo);
+#ifdef SH_TEXT
             if(shape->obj.obj_type == MBO_TEXT) {
 		sh_text_get_text(shape, text,size);
 		return;
             }
+#endif
         }
+#ifdef SH_TEXT
     } else if (MBO_TYPE(obj) == MBO_TEXT) {
 	    sh_text_get_text((shape_t *) obj,text,size);
+#endif
     } else {
 	    *text = 0;
 	    return;