summaryrefslogtreecommitdiffstats
path: root/src/display/sp-ctrlline.cpp
diff options
context:
space:
mode:
authorAndrius Ramanauskas <knutux@gmail.com>2006-04-19 05:14:26 +0000
committerknutux <knutux@users.sourceforge.net>2006-04-19 05:14:26 +0000
commitcd3043cf07c274cd641b8483b55177e9a5cb1e10 (patch)
treef860995235a5dc981868ab4f3482e861322ffe01 /src/display/sp-ctrlline.cpp
parentfix name and size (diff)
downloadinkscape-cd3043cf07c274cd641b8483b55177e9a5cb1e10.tar.gz
inkscape-cd3043cf07c274cd641b8483b55177e9a5cb1e10.zip
Rendering optimisation, which gives best results for zoomed in drawings with complex (multi-node) paths. Optimisation focus - eliminating cubicTo and LineTo nodes outside of visible area, so no unneeded calculations is needed and less memory is consumed (this avoids crashes which were occurring previously if zooming into a complex drawing)
(bzr r541)
Diffstat (limited to 'src/display/sp-ctrlline.cpp')
-rw-r--r--src/display/sp-ctrlline.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/display/sp-ctrlline.cpp b/src/display/sp-ctrlline.cpp
index 6715f890f..463d32336 100644
--- a/src/display/sp-ctrlline.cpp
+++ b/src/display/sp-ctrlline.cpp
@@ -142,7 +142,12 @@ sp_ctrlline_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int f
thePath->MoveTo(NR::Point(cl->s.x, cl->s.y) * affine);
thePath->LineTo(NR::Point(cl->e.x, cl->e.y) * affine);
- thePath->Convert(1.0);
+ NRRectL area;
+ area.x0=item->x1;
+ area.x1=item->x2;
+ area.y0=item->y1;
+ area.y1=item->y2;
+ thePath->Convert(&area, 1.0);
if ( cl->shp == NULL ) cl->shp=new Shape;
thePath->Stroke(cl->shp,false,0.5,join_straight,butt_straight,20.0,false);
cl->shp->CalcBBox();