Mercurial > MadButterfly
comparison src/redraw_man.c @ 1059:36aef79d68e4
Move macros privated used by redraw manager to redraw_man.c
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 28 Nov 2010 12:07:37 +0800 |
parents | 960e2395973d |
children | e415c55b4a0d |
comparison
equal
deleted
inserted
replaced
1058:3a03b0953e22 | 1059:36aef79d68e4 |
---|---|
302 | 302 |
303 #ifndef ASSERT | 303 #ifndef ASSERT |
304 #define ASSERT(x) | 304 #define ASSERT(x) |
305 #endif | 305 #endif |
306 | 306 |
307 /* | |
308 * Conitions for coords. | |
309 */ | |
310 #define coord_is_cached(co) ((co)->flags & COF_OWN_CANVAS) | |
311 #define coord_is_always_cached(co) ((co)->flags & COF_ALWAYS_CACHE) | |
312 #define coord_is_fast_cached(co) ((co)->flags & COF_FAST_MASK) | |
313 #define coord_is_precise_cached(co) ((co)->flags & COF_PRECISE_MASK) | |
314 #define coord_is_zeroing(co) ((co)->flags & COF_MUST_ZEROING) | |
315 #define coord_set_zeroing(co) \ | |
316 do { (co)->flags |= COF_MUST_ZEROING; } while(0) | |
317 #define coord_clear_zeroing(co) \ | |
318 do { (co)->flags &= ~COF_MUST_ZEROING; } while(0) | |
319 #define coord_set_flags(co, _flags) \ | |
320 do { (co)->flags |= (_flags); } while(0) | |
321 #define coord_get_parent(co) ((co)->parent) | |
322 #define coord_get_flags(co, _flags) ((co)->flags & (_flags)) | |
323 #define coord_clear_flags(co, _flags) \ | |
324 do { (co)->flags &= ~(_flags); } while(0) | |
325 | |
326 #define coord_get_pcache_area(coord) ((coord)->canvas_info->pcache_cur_area) | |
327 #define coord_get_pcache_last_area(coord) \ | |
328 ((coord)->canvas_info->pcache_last_area) | |
329 #define coord_get_cached(coord) ((coord)->canvas_info->owner) | |
330 #define _coord_get_dirty_areas(coord) (&(coord)->canvas_info->dirty_areas) | |
331 #define _coord_get_aggr_dirty_areas(coord) \ | |
332 ((coord)->canvas_info->aggr_dirty_areas) | |
333 #define coord_get_2pdev(coord) ((coord)->canvas_info->cache_2_pdev) | |
334 #define coord_get_2pdev_rev(coord) ((coord)->canvas_info->cache_2_pdev_rev) | |
335 #define coord_get_aggr2pdev(coord) ((coord)->canvas_info->aggr_2_pdev) | |
336 #define coord_get_aggr2pdev_rev(coord) ((coord)->canvas_info->aggr_2_pdev_rev) | |
337 | |
338 | |
307 /* NOTE: bounding box should also consider width of stroke. | 339 /* NOTE: bounding box should also consider width of stroke. |
308 */ | 340 */ |
309 | 341 |
310 #define sh_attach_geo(sh, g) \ | 342 #define sh_attach_geo(sh, g) \ |
311 do { \ | 343 do { \ |