comparison include/mb_types.h @ 1370:bae104d8d247

Add clone functions for shape types
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 05 Mar 2011 22:00:16 +0800
parents 18d718a76a45
children e22df2f3bffe
comparison
equal deleted inserted replaced
1369:9ad74b29e011 1370:bae104d8d247
390 #define sh_get_aggr_matrix(sh) (coord_get_aggr_matrix(sh_get_coord(sh))) 390 #define sh_get_aggr_matrix(sh) (coord_get_aggr_matrix(sh_get_coord(sh)))
391 #define sh_get_fill(sh) ((sh)->fill) 391 #define sh_get_fill(sh) ((sh)->fill)
392 #define sh_get_stroke(sh) ((sh)->stroke) 392 #define sh_get_stroke(sh) ((sh)->stroke)
393 #define sh_set_stroke_width(sh, v) do { (sh)->stroke_width = (v); } while(0) 393 #define sh_set_stroke_width(sh, v) do { (sh)->stroke_width = (v); } while(0)
394 #define sh_get_stroke_width(sh) (sh)->stroke_width 394 #define sh_get_stroke_width(sh) (sh)->stroke_width
395 #define sh_copy_style(rdman, sh_src, sh_dst) do { \
396 if(sh_get_fill(sh_src)) \
397 rdman_paint_fill((rdman), sh_get_fill(sh_src), (sh_dst)); \
398 if(sh_get_stroke(sh_src)) \
399 rdman_paint_stroke((rdman), sh_get_stroke(sh_src), (sh_dst)); \
400 (sh_dst)->stroke_width = (sh_src)->stroke_width; \
401 (sh_dst)->stroke_linecap = (sh_src)->stroke_linecap; \
402 (sh_dst)->stroke_linejoin = (sh_src)->stroke_linejoin; \
403 } while(0)
395 404
396 #endif /* __MB_TYPES_H_ */ 405 #endif /* __MB_TYPES_H_ */