summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 848bab0)
raw | patch | inline | side by side (parent: 848bab0)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 26 Jun 2008 23:09:58 +0000 (23:09 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 26 Jun 2008 23:09:58 +0000 (23:09 +0000) |
src/display/canvas-bpath.cpp | patch | blob | history |
index e050591d7e3615c4f32a4d05aec6458e7ef73136..ac3779029d6e093471583f9683af81ac9af8f92f 100644 (file)
@@ -118,15 +118,12 @@ sp_canvas_bpath_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i
cbp->affine = affine;
- const_NRBPath bp;
- bp.path = cbp->curve->get_bpath();
- NRRect bbox;
- nr_path_matrix_bbox_union(&bp, affine, &bbox);
-
- item->x1 = (int)bbox.x0 - 1;
- item->y1 = (int)bbox.y0 - 1;
- item->x2 = (int)bbox.x1 + 1;
- item->y2 = (int)bbox.y1 + 1;
+ Geom::Rect bbox = bounds_exact_transformed(cbp->curve->get_pathvector(), to_2geom(affine));
+
+ item->x1 = (int)bbox.min()[Geom::X] - 1;
+ item->y1 = (int)bbox.min()[Geom::Y] - 1;
+ item->x2 = (int)bbox.max()[Geom::X] + 1;
+ item->y2 = (int)bbox.max()[Geom::Y] + 1;
sp_canvas_request_redraw (item->canvas, (int)item->x1, (int)item->y1, (int)item->x2, (int)item->y2);
}