summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-17 22:30:17 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-18 10:03:16 -0400
commit77b6c1602aaa0bd059077765e7fabb53d9e6ddeb (patch)
treec60449dc7161ec71b7acf0bf0ad8987bb3a5b877 /drawinglayer
parent2736674aa1eca906ba5f726e47279266cce2149e (diff)
fdo#75260: Don't forget to offset the inner with the width of the outer.
The inner and outer lines were drawn side-by-side as one fat line because of this. The positions of the right and bottom border lines are still off even after this change. Change-Id: Ia4b661bb819a813562e0143397cada52148f26e9
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/borderlineprimitive2d.cxx56
1 files changed, 26 insertions, 30 deletions
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 67efa09da581..b74061ee25c7 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -183,37 +183,33 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
xRetval.realloc(2);
- {
- // "inside" line
- double fWidth = getLeftWidth();
- basegfx::BColor aColor = getRGBColorLeft();
- bool bIsHairline = lcl_UseHairline(
- fWidth, getStart(), getEnd(), rViewInformation);
- fWidth = lcl_GetCorrectedWidth(fWidth,
- getStart(), getEnd(), rViewInformation);
-
- if (bIsHairline)
- xRetval[0] = makeHairLinePrimitive(getStart(), getEnd(), aVector, aColor, 0.0);
- else
- xRetval[0] = makeSolidLinePrimitive(
- aClipRegion, aTmpStart, aTmpEnd, aVector, aColor, fWidth, 0.0);
- }
+ double fLeftWidth = getLeftWidth();
+ bool bLeftHairline = lcl_UseHairline(fLeftWidth, getStart(), getEnd(), rViewInformation);
+ if (bLeftHairline)
+ fLeftWidth = 0.0;
- {
- // "outside" line
- double fWidth = getRightWidth();
- basegfx::BColor aColor = getRGBColorRight();
- bool bIsHairline = lcl_UseHairline(
- fWidth, getStart(), getEnd(), rViewInformation);
- fWidth = lcl_GetCorrectedWidth(fWidth,
- getStart(), getEnd(), rViewInformation);
-
- if (bIsHairline)
- xRetval[1] = makeHairLinePrimitive(getStart(), getEnd(), aVector, aColor, mfDistance);
- else
- xRetval[1] = makeSolidLinePrimitive(
- aClipRegion, aTmpStart, aTmpEnd, aVector, aColor, fWidth, mfDistance);
- }
+ double fRightWidth = getRightWidth();
+ bool bRightHairline = lcl_UseHairline(fRightWidth, getStart(), getEnd(), rViewInformation);
+ if (bRightHairline)
+ fRightWidth = 0.0;
+
+ // "inside" line
+
+ if (bLeftHairline)
+ xRetval[0] = makeHairLinePrimitive(
+ getStart(), getEnd(), aVector, getRGBColorLeft(), 0.0);
+ else
+ xRetval[0] = makeSolidLinePrimitive(
+ aClipRegion, aTmpStart, aTmpEnd, aVector, getRGBColorLeft(), fLeftWidth, 0.0);
+
+ // "outside" line
+
+ if (bRightHairline)
+ xRetval[1] = makeHairLinePrimitive(
+ getStart(), getEnd(), aVector, getRGBColorRight(), fLeftWidth+mfDistance);
+ else
+ xRetval[1] = makeSolidLinePrimitive(
+ aClipRegion, aTmpStart, aTmpEnd, aVector, getRGBColorRight(), fRightWidth, fLeftWidth+mfDistance);
}
else
{