diff options
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/svglinenode.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx index 6d184807702a..b63fd8fa9768 100644 --- a/svgio/source/svgreader/svglinenode.cxx +++ b/svgio/source/svgreader/svglinenode.cxx @@ -134,21 +134,21 @@ namespace svgio getX2().isSet() ? getX2().solve(*this, xcoordinate) : 0.0, getY2().isSet() ? getY2().solve(*this, ycoordinate) : 0.0); - if(!X.equal(Y)) - { - basegfx::B2DPolygon aPath; + // X and Y may be equal, do not drop them. Markers or linecaps 'round' and 'square' + // need to be drawn for zero-length lines too. - aPath.append(X); - aPath.append(Y); + basegfx::B2DPolygon aPath; - drawinglayer::primitive2d::Primitive2DContainer aNewTarget; + aPath.append(X); + aPath.append(Y); - pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr); + drawinglayer::primitive2d::Primitive2DContainer aNewTarget; - if(!aNewTarget.empty()) - { - pStyle->add_postProcess(rTarget, aNewTarget, getTransform()); - } + pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr); + + if(!aNewTarget.empty()) + { + pStyle->add_postProcess(rTarget, aNewTarget, getTransform()); } } } |