[Libreoffice-commits] core.git: Branch 'private/kohei/double-border-fix' - drawinglayer/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Mar 3 20:48:26 PST 2014
drawinglayer/source/primitive2d/borderlineprimitive2d.cxx | 15 ++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
New commits:
commit 01ba7a91a6c10c309f6a0429fadb98fa1e388d4d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Mar 3 23:48:42 2014 -0500
Move the lines first then clip.
Change-Id: I4b7706dbd0a662637c3e8e8c00ef376b23eb0189
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 0a85527..67efa09 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -53,8 +53,7 @@ primitive2d::Primitive2DReference makeHairLinePrimitive(
basegfx::B2DPolygon aPolygon;
aPolygon.append(rStart);
aPolygon.append(rEnd);
- if (fGap != 0.0)
- moveLine(aPolygon, fGap, rVector);
+ moveLine(aPolygon, fGap, rVector);
return primitive2d::Primitive2DReference(new primitive2d::PolygonHairlinePrimitive2D(aPolygon, rColor));
}
@@ -73,15 +72,14 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
aPolygon.append(rStart - aLineWidthOffset);
aPolygon.setClosed(true);
+ moveLine(aPolygon, fGap, rVector);
+
basegfx::B2DPolyPolygon aClipped =
basegfx::tools::clipPolygonOnPolyPolygon(aPolygon, rClipRegion, true, false);
if (aClipped.count())
aPolygon = aClipped.getB2DPolygon(0);
- if (fGap != 0.0)
- moveLine(aPolygon, fGap, rVector);
-
return primitive2d::Primitive2DReference(
new primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), rColor));
}
@@ -183,9 +181,6 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
const basegfx::B2DPoint aTmpStart(getStart() - (fExt * aVector));
const basegfx::B2DPoint aTmpEnd(getEnd() + (fExt * aVector));
- // distance is already scaled.
- double fGap = mfDistance;
-
xRetval.realloc(2);
{
@@ -214,10 +209,10 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
getStart(), getEnd(), rViewInformation);
if (bIsHairline)
- xRetval[1] = makeHairLinePrimitive(getStart(), getEnd(), aVector, aColor, fGap);
+ xRetval[1] = makeHairLinePrimitive(getStart(), getEnd(), aVector, aColor, mfDistance);
else
xRetval[1] = makeSolidLinePrimitive(
- aClipRegion, aTmpStart, aTmpEnd, aVector, aColor, fWidth, fGap);
+ aClipRegion, aTmpStart, aTmpEnd, aVector, aColor, fWidth, mfDistance);
}
}
else
More information about the Libreoffice-commits
mailing list