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.h | |
| 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.h')
| -rw-r--r-- | src/livarot/Path.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/livarot/Path.h b/src/livarot/Path.h index 5b1df6294..291d8f157 100644 --- a/src/livarot/Path.h +++ b/src/livarot/Path.h @@ -13,6 +13,7 @@ #include "LivarotDefs.h" #include "livarot/livarot-forward.h" #include "libnr/nr-point.h" +#include <libnr/nr-rect-l.h> /* * the Path class: a structure to hold path description and their polyline approximation (not kept in sync) @@ -108,6 +109,7 @@ public: // transforms a description in a polyline (for stroking and filling) // treshhold is the max length^2 (sort of) void Convert (double treshhold); + void Convert(NRRectL *area, double treshhold); void ConvertEvenLines (double treshhold); // decomposes line segments too, for later recomposition // same function for use when you want to later recompose the curves from the polyline void ConvertWithBackData (double treshhold); @@ -119,6 +121,7 @@ public: int AddPoint ( NR::Point const &iPt, int ip, double it, bool mvto = false); int AddForcedPoint ( NR::Point const &iPt); // add point int AddForcedPoint ( NR::Point const &iPt, int ip, double it); + int ReplacePoint(NR::Point const &iPt); // replace point // transform in a polygon (in a graph, in fact; a subsequent call to ConvertToShape is needed) // - fills the polyline; justAdd=true doesn't reset the Shape dest, but simply adds the polyline into it |
