summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f67a75b)
raw | patch | inline | side by side (parent: f67a75b)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 26 Jun 2008 14:56:51 +0000 (14:56 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 26 Jun 2008 14:56:51 +0000 (14:56 +0000) |
src/display/canvas-bpath.cpp | patch | blob | history | |
src/display/nr-arena-shape.cpp | patch | blob | history |
index 714538d1b455cc9fdfd1b48fefc3b991e9d54c98..eccaf4aeddd1652fce1a26831acc7a11b8a4cced 100644 (file)
#include <libnr/nr-pixops.h>
#include <libnr/nr-convert2geom.h>
#include <libnr/nr-path.h>
+#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;
index dd44fa5a501ad17d7c665bc0b4b5d75041e7a353..74f207809402a29322a22ddef5b09adecc501f1a 100644 (file)
@@ -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);