summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-06-16 20:58:41 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-06-16 20:58:41 +0000
commit2982bb3bfbfb12f52cf43d459fe3baa95f147102 (patch)
tree2d9906b19316363a7c1ae92493c805f62aa13092 /src
parentadd geom helper file. this will contain Inkscape specific geometry calculatio... (diff)
downloadinkscape-2982bb3bfbfb12f52cf43d459fe3baa95f147102.tar.gz
inkscape-2982bb3bfbfb12f52cf43d459fe3baa95f147102.zip
have bbox calculation code use new helper/geom.cpp function. This makes it easier to optimize it later.
(bzr r5966)
Diffstat (limited to 'src')
-rw-r--r--src/display/nr-arena-shape.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp
index de5b9c770..146d1a5ca 100644
--- a/src/display/nr-arena-shape.cpp
+++ b/src/display/nr-arena-shape.cpp
@@ -32,7 +32,7 @@
#include <style.h>
#include "prefs-utils.h"
#include "inkscape-cairo.h"
-
+#include "helper/geom.h"
#include "sp-filter.h"
#include "sp-filter-reference.h"
#include "display/nr-filter.h"
@@ -251,8 +251,7 @@ nr_arena_shape_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, g
shape->ctm = gc->transform;
if (state & NR_ARENA_ITEM_STATE_BBOX) {
if (shape->curve) {
- Geom::PathVector pv = shape->curve->get_pathvector() * to_2geom(gc->transform);
- boundingbox = Geom::bounds_fast(pv);
+ boundingbox = bounds_fast_transformed(shape->curve->get_pathvector(), to_2geom(gc->transform));
item->bbox.x0 = (gint32)(boundingbox[0][0] - 1.0F);
item->bbox.y0 = (gint32)(boundingbox[1][0] - 1.0F);
item->bbox.x1 = (gint32)(boundingbox[0][1] + 1.9999F);
@@ -275,8 +274,7 @@ nr_arena_shape_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, g
bool outline = (NR_ARENA_ITEM(shape)->arena->rendermode == Inkscape::RENDERMODE_OUTLINE);
if (shape->curve) {
- Geom::PathVector pv = shape->curve->get_pathvector() * to_2geom(gc->transform);
- boundingbox = Geom::bounds_fast(pv);
+ boundingbox = bounds_fast_transformed(shape->curve->get_pathvector(), to_2geom(gc->transform));
if (shape->_stroke.paint.type() != NRArenaShape::Paint::NONE || outline) {
float width, scale;