comparison src/shape_path.c @ 270:cd6af7da32c9

Fix the problem that clean_canvas() can not clean canvas cleanly. - For some unknown reasons, cairo_paint() can not clean painted graphics cleanly. - Use cairo_rectangle() and cairo_fill() to replace cairo_paint().
author Thinker K.F. Li <thinker@branda.to>
date Sun, 25 Jan 2009 16:07:43 +0800
parents c96f38ad4bb6
children 16116d84bc5e
comparison
equal deleted inserted replaced
269:c96f38ad4bb6 270:cd6af7da32c9
786 786
787 if(path->shape.geo) { 787 if(path->shape.geo) {
788 poses = (co_aix (*)[2])(path->dev_data + path->cmd_len); 788 poses = (co_aix (*)[2])(path->dev_data + path->cmd_len);
789 geo_from_positions(path->shape.geo, arg_len / 2, poses); 789 geo_from_positions(path->shape.geo, arg_len / 2, poses);
790 area = shape->geo->cur_area; 790 area = shape->geo->cur_area;
791 area->x -= shape->stroke_width/2 + 1; 791 area->x -= shape->stroke_width / 2 + 0.5;
792 area->y -= shape->stroke_width/2 + 1; 792 area->y -= shape->stroke_width / 2 + 0.5;
793 area->w += shape->stroke_width + 2; 793 area->w += shape->stroke_width + 1;
794 area->h += shape->stroke_width + 2; 794 area->h += shape->stroke_width + 1;
795 } 795 }
796 } 796 }
797 797
798 static void sh_path_path(shape_t *shape, cairo_t *cr) { 798 static void sh_path_path(shape_t *shape, cairo_t *cr) {
799 sh_path_t *path; 799 sh_path_t *path;