diff options
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/inc/svgio/svgreader/svgpathnode.hxx | 10 | ||||
-rw-r--r-- | svgio/inc/svgio/svgreader/svgstyleattributes.hxx | 7 | ||||
-rw-r--r-- | svgio/source/svgreader/svgcirclenode.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svgreader/svgellipsenode.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svgreader/svglinenode.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svgreader/svgpathnode.cxx | 4 | ||||
-rw-r--r-- | svgio/source/svgreader/svgpolynode.cxx | 3 | ||||
-rw-r--r-- | svgio/source/svgreader/svgrectnode.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 20 |
9 files changed, 36 insertions, 16 deletions
diff --git a/svgio/inc/svgio/svgreader/svgpathnode.hxx b/svgio/inc/svgio/svgreader/svgpathnode.hxx index a9e61d3361f4..1907baba8411 100644 --- a/svgio/inc/svgio/svgreader/svgpathnode.hxx +++ b/svgio/inc/svgio/svgreader/svgpathnode.hxx @@ -22,6 +22,7 @@ #include <svgio/svgreader/svgnode.hxx> #include <svgio/svgreader/svgstyleattributes.hxx> +#include <basegfx/polygon/b2dpolypolygontools.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -33,12 +34,13 @@ namespace svgio { private: /// use styles - SvgStyleAttributes maSvgStyleAttributes; + SvgStyleAttributes maSvgStyleAttributes; /// variable scan values, dependent of given XAttributeList - basegfx::B2DPolyPolygon* mpPolyPolygon; - basegfx::B2DHomMatrix* mpaTransform; - SvgNumber maPathLength; + basegfx::B2DPolyPolygon* mpPolyPolygon; + basegfx::B2DHomMatrix* mpaTransform; + SvgNumber maPathLength; + basegfx::tools::PointIndexSet maHelpPointIndices; public: SvgPathNode( diff --git a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx index be8ddd4e64e1..1624b37aebc8 100644 --- a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx +++ b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx @@ -23,6 +23,7 @@ #include <svgio/svgreader/svgpaint.hxx> #include <svgio/svgreader/svgnode.hxx> #include <vcl/vclenum.hxx> +#include <basegfx/polygon/b2dpolypolygontools.hxx> ////////////////////////////////////////////////////////////////////////////// // predefines @@ -250,7 +251,8 @@ namespace svgio const SvgMarkerNode& rMarker) const; void add_markers( const basegfx::B2DPolyPolygon& rPath, - drawinglayer::primitive2d::Primitive2DSequence& rTarget) const; + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const basegfx::tools::PointIndexSet* pHelpPointIndices) const; public: /// local attribute scanner @@ -262,7 +264,8 @@ namespace svgio drawinglayer::primitive2d::Primitive2DSequence& rSource) const; void add_path( const basegfx::B2DPolyPolygon& rPath, - drawinglayer::primitive2d::Primitive2DSequence& rTarget) const; + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const basegfx::tools::PointIndexSet* pHelpPointIndices) const; void add_postProcess( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::Primitive2DSequence& rSource, diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx index c742a41f9989..f462a07e3284 100644 --- a/svgio/source/svgreader/svgcirclenode.cxx +++ b/svgio/source/svgreader/svgcirclenode.cxx @@ -135,7 +135,7 @@ namespace svgio drawinglayer::primitive2d::Primitive2DSequence aNewTarget; - pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget); + pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0); if(aNewTarget.hasElements()) { diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx index aa42d7adc757..283e9da9826b 100644 --- a/svgio/source/svgreader/svgellipsenode.cxx +++ b/svgio/source/svgreader/svgellipsenode.cxx @@ -150,7 +150,7 @@ namespace svgio drawinglayer::primitive2d::Primitive2DSequence aNewTarget; - pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget); + pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0); if(aNewTarget.hasElements()) { diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx index 74e9facbf973..aebefe7fdd9c 100644 --- a/svgio/source/svgreader/svglinenode.cxx +++ b/svgio/source/svgreader/svglinenode.cxx @@ -146,7 +146,7 @@ namespace svgio drawinglayer::primitive2d::Primitive2DSequence aNewTarget; - pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget); + pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0); if(aNewTarget.hasElements()) { diff --git a/svgio/source/svgreader/svgpathnode.cxx b/svgio/source/svgreader/svgpathnode.cxx index 9e77f723a6df..e745711e786d 100644 --- a/svgio/source/svgreader/svgpathnode.cxx +++ b/svgio/source/svgreader/svgpathnode.cxx @@ -69,7 +69,7 @@ namespace svgio { basegfx::B2DPolyPolygon aPath; - if(basegfx::tools::importFromSvgD(aPath, aContent)) + if(basegfx::tools::importFromSvgD(aPath, aContent, false, &maHelpPointIndices)) { if(aPath.count()) { @@ -114,7 +114,7 @@ namespace svgio { drawinglayer::primitive2d::Primitive2DSequence aNewTarget; - pStyle->add_path(*getPath(), aNewTarget); + pStyle->add_path(*getPath(), aNewTarget, &maHelpPointIndices); if(aNewTarget.hasElements()) { diff --git a/svgio/source/svgreader/svgpolynode.cxx b/svgio/source/svgreader/svgpolynode.cxx index eef4808404dc..c475c79f7206 100644 --- a/svgio/source/svgreader/svgpolynode.cxx +++ b/svgio/source/svgreader/svgpolynode.cxx @@ -20,6 +20,7 @@ #include <svgio/svgreader/svgpolynode.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -111,7 +112,7 @@ namespace svgio { drawinglayer::primitive2d::Primitive2DSequence aNewTarget; - pStyle->add_path(basegfx::B2DPolyPolygon(*getPolygon()), aNewTarget); + pStyle->add_path(basegfx::B2DPolyPolygon(*getPolygon()), aNewTarget, 0); if(aNewTarget.hasElements()) { diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx index 5d518a46c245..8348ed76ae14 100644 --- a/svgio/source/svgreader/svgrectnode.cxx +++ b/svgio/source/svgreader/svgrectnode.cxx @@ -207,7 +207,7 @@ namespace svgio drawinglayer::primitive2d::Primitive2DSequence aNewTarget; - pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget); + pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0); if(aNewTarget.hasElements()) { diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 958debdfe21c..0e8be846a6fc 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -829,7 +829,8 @@ namespace svgio void SvgStyleAttributes::add_markers( const basegfx::B2DPolyPolygon& rPath, - drawinglayer::primitive2d::Primitive2DSequence& rTarget) const + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const basegfx::tools::PointIndexSet* pHelpPointIndices) const { // try to access linked markers const SvgMarkerNode* pStart = accessMarkerStartXLink(); @@ -888,6 +889,18 @@ namespace svgio pNeeded = pMid; } + if(pHelpPointIndices && !pHelpPointIndices->empty()) + { + const basegfx::tools::PointIndexSet::const_iterator aFound( + pHelpPointIndices->find(basegfx::tools::PointIndex(a, b))); + + if(aFound != pHelpPointIndices->end()) + { + // this point is a pure helper point; do not create a marker for it + continue; + } + } + if(!pNeeded) { // no marker needs to be created for this point @@ -999,7 +1012,8 @@ namespace svgio void SvgStyleAttributes::add_path( const basegfx::B2DPolyPolygon& rPath, - drawinglayer::primitive2d::Primitive2DSequence& rTarget) const + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const basegfx::tools::PointIndexSet* pHelpPointIndices) const { if(!rPath.count()) { @@ -1057,7 +1071,7 @@ namespace svgio SVGTokenLine == mrOwner.getType()) // line { // try to add markers - add_markers(rPath, rTarget); + add_markers(rPath, rTarget, pHelpPointIndices); } } |