diff options
| author | Andrius Ramanauskas <knutux@gmail.com> | 2006-04-19 05:14:26 +0000 |
|---|---|---|
| committer | knutux <knutux@users.sourceforge.net> | 2006-04-19 05:14:26 +0000 |
| commit | cd3043cf07c274cd641b8483b55177e9a5cb1e10 (patch) | |
| tree | f860995235a5dc981868ab4f3482e861322ffe01 /src/livarot/Path.cpp | |
| parent | fix name and size (diff) | |
| download | inkscape-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/livarot/Path.cpp')
| -rw-r--r-- | src/livarot/Path.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 32c100310..8ad806349 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -428,6 +428,18 @@ int Path::AddPoint(NR::Point const &iPt, bool mvto) } +int Path::ReplacePoint(NR::Point const &iPt) +{ + if (pts.empty()) { + return -1; + } + + int const n = pts.size() - 1; + pts[n] = path_lineto(polyline_lineto, iPt); + return n; +} + + int Path::AddPoint(NR::Point const &iPt, int ip, double it, bool mvto) { if (back == false) { |
