From: johanengelen Date: Thu, 26 Jun 2008 14:56:51 +0000 (+0000) Subject: use pathv_matrix_point_bbox_wind_distance instead of nr_path_matrix_point_bbox_wind_d... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=43dbab374d61988a3007554cb2246668473f1c69;p=inkscape.git use pathv_matrix_point_bbox_wind_distance instead of nr_path_matrix_point_bbox_wind_distance everywhere --- diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp index 714538d1b..eccaf4aed 100644 --- a/src/display/canvas-bpath.cpp +++ b/src/display/canvas-bpath.cpp @@ -26,6 +26,7 @@ #include #include #include +#include "helper/geom.h" void nr_pixblock_render_bpath_rgba (Shape* theS,uint32_t color,NRRectL &area,char* destBuf,int stride); @@ -182,19 +183,16 @@ sp_canvas_bpath_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_it { SPCanvasBPath *cbp = SP_CANVAS_BPATH (item); - const_NRBPath bp; if ( !cbp->curve || ((cbp->stroke_rgba & 0xff) == 0 && (cbp->fill_rgba & 0xff) == 0 ) || cbp->curve->get_length() <= 1) return NR_HUGE; - bp.path = cbp->curve->get_bpath(); - double width = 0.5; NR::Rect viewbox = item->canvas->getViewbox(); viewbox.growBy (width); double dist = NR_HUGE; - nr_path_matrix_point_bbox_wind_distance(&bp, cbp->affine, p, NULL, NULL, &dist, 0.5, &viewbox); + pathv_matrix_point_bbox_wind_distance(cbp->curve->get_pathvector(), cbp->affine, p, NULL, NULL, &dist, 0.5, &viewbox); if (dist <= 1.0) { *actual_item = item; diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp index dd44fa5a5..74f207809 100644 --- a/src/display/nr-arena-shape.cpp +++ b/src/display/nr-arena-shape.cpp @@ -1086,8 +1086,6 @@ nr_arena_shape_pick(NRArenaItem *item, NR::Point p, double delta, unsigned int / width = 0; } - const_NRBPath bp; - bp.path = SP_CURVE_BPATH(shape->curve); double dist = NR_HUGE; int wind = 0; bool needfill = (shape->_fill.paint.type() != NRArenaShape::Paint::NONE @@ -1096,9 +1094,9 @@ nr_arena_shape_pick(NRArenaItem *item, NR::Point p, double delta, unsigned int / if (item->arena->canvasarena) { NR::Rect viewbox = item->arena->canvasarena->item.canvas->getViewbox(); viewbox.growBy (width); - nr_path_matrix_point_bbox_wind_distance(&bp, shape->ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, &viewbox); + pathv_matrix_point_bbox_wind_distance(shape->curve->get_pathvector(), shape->ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, &viewbox); } else { - nr_path_matrix_point_bbox_wind_distance(&bp, shape->ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, NULL); + pathv_matrix_point_bbox_wind_distance(shape->curve->get_pathvector(), shape->ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, NULL); } g_get_current_time (&tfinish);