From: johanengelen Date: Thu, 26 Jun 2008 23:09:58 +0000 (+0000) Subject: use 2geom path for bbox calculation. (gets rid of yet another reference to old nartbp... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=688effa1c3eb4c41498a59e2e0c67bd2b44e90ab;p=inkscape.git use 2geom path for bbox calculation. (gets rid of yet another reference to old nartbpath in spcurve!) --- diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp index e050591d7..ac3779029 100644 --- a/src/display/canvas-bpath.cpp +++ b/src/display/canvas-bpath.cpp @@ -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); }