comparison src/redraw_man.c @ 196:c234ee745ceb

Start moving to mb_obj_t
author Thinker K.F. Li <thinker@branda.to>
date Tue, 09 Dec 2008 17:34:10 +0800
parents 45d9a1e2764d
children 29e1b2bffe4c
comparison
equal deleted inserted replaced
195:5235aded379c 196:c234ee745ceb
748 } 748 }
749 return 0; 749 return 0;
750 } 750 }
751 751
752 static void clean_shape(shape_t *shape) { 752 static void clean_shape(shape_t *shape) {
753 switch(shape->sh_type) { 753 switch(MBO_TYPE(shape)) {
754 case SHT_PATH: 754 case MBO_PATH:
755 sh_path_transform(shape); 755 sh_path_transform(shape);
756 break; 756 break;
757 case SHT_TEXT: 757 case MBO_TEXT:
758 sh_text_transform(shape); 758 sh_text_transform(shape);
759 break; 759 break;
760 case SHT_RECT: 760 case MBO_RECT:
761 sh_rect_transform(shape); 761 sh_rect_transform(shape);
762 break; 762 break;
763 #ifdef UNITTEST 763 #ifdef UNITTEST
764 default: 764 default:
765 sh_dummy_transform(shape); 765 sh_dummy_transform(shape);
948 948
949 /*! \todo Move operator of shapes into singleton structures that define 949 /*! \todo Move operator of shapes into singleton structures that define
950 * operators for them. 950 * operators for them.
951 */ 951 */
952 if(shape->fill || shape->stroke) { 952 if(shape->fill || shape->stroke) {
953 switch(shape->sh_type) { 953 switch(MBO_TYPE(shape)) {
954 case SHT_PATH: 954 case MBO_PATH:
955 sh_path_draw(shape, cr); 955 sh_path_draw(shape, cr);
956 break; 956 break;
957 case SHT_TEXT: 957 case MBO_TEXT:
958 sh_text_draw(shape, cr); 958 sh_text_draw(shape, cr);
959 break; 959 break;
960 case SHT_RECT: 960 case MBO_RECT:
961 sh_rect_draw(shape, cr); 961 sh_rect_draw(shape, cr);
962 break; 962 break;
963 #ifdef UNITTEST 963 #ifdef UNITTEST
964 default: 964 default:
965 sh_dummy_fill(shape, cr); 965 sh_dummy_fill(shape, cr);