diff 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
line wrap: on
line diff
--- a/src/shape_path.c	Sun Jan 25 00:20:34 2009 +0800
+++ b/src/shape_path.c	Sun Jan 25 16:07:43 2009 +0800
@@ -788,10 +788,10 @@
 	poses = (co_aix (*)[2])(path->dev_data + path->cmd_len);
 	geo_from_positions(path->shape.geo, arg_len / 2, poses);
 	area = shape->geo->cur_area;
-	area->x -= shape->stroke_width/2 + 1;
-	area->y -= shape->stroke_width/2 + 1;
-	area->w += shape->stroke_width + 2;
-	area->h += shape->stroke_width + 2;
+	area->x -= shape->stroke_width / 2 + 0.5;
+	area->y -= shape->stroke_width / 2 + 0.5;
+	area->w += shape->stroke_width + 1;
+	area->h += shape->stroke_width + 1;
     }
 }