Mercurial > MadButterfly
comparison src/redraw_man.c @ 435:2bdd4f5dd2ca
Make sh_text and sh_stext optional.
Since sh_text depends on pango, and we want a version of MadButterfly
without Pango (lite version), we make sh_text and sh_stext optional.
User can choice which one to enable.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 29 Jul 2009 20:22:36 +0800 |
parents | bec538d361e9 |
children | 94477e7d981e |
comparison
equal
deleted
inserted
replaced
434:b5c7670b524b | 435:2bdd4f5dd2ca |
---|---|
7 #include "mb_shapes.h" | 7 #include "mb_shapes.h" |
8 #include "mb_tools.h" | 8 #include "mb_tools.h" |
9 #include "mb_redraw_man.h" | 9 #include "mb_redraw_man.h" |
10 #include "mb_observer.h" | 10 #include "mb_observer.h" |
11 #include "mb_prop.h" | 11 #include "mb_prop.h" |
12 #include "../config.h" | |
12 | 13 |
13 /* required by rdman_img_ldr_load_paint() */ | 14 /* required by rdman_img_ldr_load_paint() */ |
14 #include "mb_paint.h" | 15 #include "mb_paint.h" |
15 | 16 |
16 /*! \page dirty Dirty geo, coord, and area. | 17 /*! \page dirty Dirty geo, coord, and area. |
1161 static void clean_shape(shape_t *shape) { | 1162 static void clean_shape(shape_t *shape) { |
1162 switch(MBO_TYPE(shape)) { | 1163 switch(MBO_TYPE(shape)) { |
1163 case MBO_PATH: | 1164 case MBO_PATH: |
1164 sh_path_transform(shape); | 1165 sh_path_transform(shape); |
1165 break; | 1166 break; |
1167 #ifdef SH_TEXT | |
1166 case MBO_TEXT: | 1168 case MBO_TEXT: |
1167 sh_text_transform(shape); | 1169 sh_text_transform(shape); |
1168 break; | 1170 break; |
1171 #endif | |
1169 case MBO_RECT: | 1172 case MBO_RECT: |
1170 sh_rect_transform(shape); | 1173 sh_rect_transform(shape); |
1171 break; | 1174 break; |
1172 case MBO_IMAGE: | 1175 case MBO_IMAGE: |
1173 sh_image_transform(shape); | 1176 sh_image_transform(shape); |
1174 break; | 1177 break; |
1178 #ifdef SH_STEXT | |
1175 case MBO_STEXT: | 1179 case MBO_STEXT: |
1176 sh_stext_transform(shape); | 1180 sh_stext_transform(shape); |
1177 break; | 1181 break; |
1182 #endif | |
1178 #ifdef UNITTEST | 1183 #ifdef UNITTEST |
1179 default: | 1184 default: |
1180 sh_dummy_transform(shape); | 1185 sh_dummy_transform(shape); |
1181 break; | 1186 break; |
1182 #endif /* UNITTEST */ | 1187 #endif /* UNITTEST */ |
1815 if(shape->fill || shape->stroke) { | 1820 if(shape->fill || shape->stroke) { |
1816 switch(MBO_TYPE(shape)) { | 1821 switch(MBO_TYPE(shape)) { |
1817 case MBO_PATH: | 1822 case MBO_PATH: |
1818 sh_path_draw(shape, cr); | 1823 sh_path_draw(shape, cr); |
1819 break; | 1824 break; |
1825 #ifdef SH_TEXT | |
1820 case MBO_TEXT: | 1826 case MBO_TEXT: |
1821 sh_text_draw(shape, cr); | 1827 sh_text_draw(shape, cr); |
1822 break; | 1828 break; |
1829 #endif | |
1823 case MBO_RECT: | 1830 case MBO_RECT: |
1824 sh_rect_draw(shape, cr); | 1831 sh_rect_draw(shape, cr); |
1825 break; | 1832 break; |
1826 case MBO_IMAGE: | 1833 case MBO_IMAGE: |
1827 sh_image_draw(shape, cr); | 1834 sh_image_draw(shape, cr); |
1828 break; | 1835 break; |
1836 #ifdef SH_STEXT | |
1829 case MBO_STEXT: | 1837 case MBO_STEXT: |
1830 sh_stext_draw(shape, cr); | 1838 sh_stext_draw(shape, cr); |
1831 break; | 1839 break; |
1840 #endif | |
1832 #ifdef UNITTEST | 1841 #ifdef UNITTEST |
1833 default: | 1842 default: |
1834 sh_dummy_fill(shape, cr); | 1843 sh_dummy_fill(shape, cr); |
1835 break; | 1844 break; |
1836 #endif /* UNITTEST */ | 1845 #endif /* UNITTEST */ |