comparison src/shape_path.c @ 235:65cabbdd5284

termporary revision
author Thinker K.F. Li <thinker@branda.to>
date Thu, 25 Dec 2008 18:40:27 +0800
parents 29e1b2bffe4c
children c96f38ad4bb6
comparison
equal deleted inserted replaced
234:889cdc5f23c5 235:65cabbdd5284
39 (x)++; \ 39 (x)++; \
40 } 40 }
41 #define OK 0 41 #define OK 0
42 #define ERR -1 42 #define ERR -1
43 #define PI 3.1415926 43 #define PI 3.1415926
44
45 #ifdef UNITTEST
46 #undef rdman_shape_man
47 #define rdman_shape_man(x, y)
48 #endif
44 49
45 /* ============================================================ 50 /* ============================================================
46 * Implement arc in path. 51 * Implement arc in path.
47 */ 52 */
48 #include <math.h> 53 #include <math.h>
704 } 709 }
705 memcpy(path->dev_data, path->user_data, msz); 710 memcpy(path->dev_data, path->user_data, msz);
706 711
707 path->shape.free = sh_path_free; 712 path->shape.free = sh_path_free;
708 713
709 #ifndef UNITTEST
710 rdman_shape_man(rdman, (shape_t *)path); 714 rdman_shape_man(rdman, (shape_t *)path);
711 #endif
712 715
713 return (shape_t *)path; 716 return (shape_t *)path;
714 } 717 }
715 718
716 shape_t *rdman_shape_path_new_from_binary(redraw_man_t *rdman, char *commands, co_aix *arg,int arg_cnt,int *fix_arg,int fix_arg_cnt) { 719 shape_t *rdman_shape_path_new_from_binary(redraw_man_t *rdman, char *commands, co_aix *arg,int arg_cnt,int *fix_arg,int fix_arg_cnt) {
739 memcpy(path->user_data+cmd_cnt+arg_cnt*sizeof(co_aix),fix_arg, sizeof(int)*fix_arg_cnt); 742 memcpy(path->user_data+cmd_cnt+arg_cnt*sizeof(co_aix),fix_arg, sizeof(int)*fix_arg_cnt);
740 memcpy(path->dev_data, path->user_data, msz); 743 memcpy(path->dev_data, path->user_data, msz);
741 744
742 path->shape.free = sh_path_free; 745 path->shape.free = sh_path_free;
743 746
744 #ifndef UNITTEST
745 rdman_shape_man(rdman, (shape_t *)path); 747 rdman_shape_man(rdman, (shape_t *)path);
746 #endif
747 748
748 return (shape_t *)path; 749 return (shape_t *)path;
749 } 750 }
750 751
751 752