Kaydet (Commit) 74040d44 authored tarafından Regina Henschel's avatar Regina Henschel Kaydeden (comit) Thorsten Behrens

tdf#98119 Allow markers on zero-length lines

Inkscape, Seamonkey, Chrome and Batik show markers on zero-
length lines, LibreOffice should do that too. The patch
removes the restriction start<>end.

Change-Id: I984baf755df7b2689e00d2a23b40e3f059c0add0
Reviewed-on: https://gerrit.libreoffice.org/22740Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 728c9ce4
......@@ -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());
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment