diff src/shape_path.c @ 26:d50f33040de6

Set line width for path. - consider width of line when compute bounding box area.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 03 Aug 2008 13:04:55 +0800
parents 8fcf2d878ecd
children e06a4a667ce2
line wrap: on
line diff
--- a/src/shape_path.c	Sun Aug 03 02:19:32 2008 +0800
+++ b/src/shape_path.c	Sun Aug 03 13:04:55 2008 +0800
@@ -394,6 +394,7 @@
     sh_path_t *path;
     co_aix *user_args, *dev_args;
     co_aix (*poses)[2];
+    area_t *area;
     int arg_len;
     int i;
 
@@ -414,6 +415,11 @@
     if(path->shape.geo) {
 	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;
     }
 }