summaryrefslogtreecommitdiff
path: root/drawinglayer/qa
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-08-11 18:32:33 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-09-15 12:58:03 +0200
commitfe14ddf25003c0f79f9f8a249bc22d45f57a0068 (patch)
treef0470ccd992a439bf52b83688d818c776bcd733e /drawinglayer/qa
parent596efaad51735a130e7b7bd27dbc34dc07f32f68 (diff)
borderline: Abstraction of BorderLinePrimitive
As preparation for more detailed definition of BorderLine primitives I have adapted the BorderLine definition to work with motre possibilities to define the LineStartEnd definitions in a BorderLineExtend class. That one is flexible to hold all kinds of definitions - from none to all four possible extends (Start/End, Left/Right of vector) Cleanup of DiagStyle and others: DiagStyle is not needed anymore due to no longer using angles calculated, but being based on vectors defining the geometry. Also cleaned up quite a bit of no longer needed calculation stuff for the control.
Diffstat (limited to 'drawinglayer/qa')
-rw-r--r--drawinglayer/qa/unit/border.cxx36
1 files changed, 30 insertions, 6 deletions
diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx
index 326c5deaa163..a070f9cdff24 100644
--- a/drawinglayer/qa/unit/border.cxx
+++ b/drawinglayer/qa/unit/border.cxx
@@ -65,9 +65,21 @@ void DrawinglayerBorderTest::testDoubleDecompositionSolid()
new drawinglayer::primitive2d::BorderLinePrimitive2D(
aStart,
aEnd,
- drawinglayer::primitive2d::BorderLine(fLeftWidth, aColorLeft, fExtendLeftStart, fExtendLeftEnd),
- drawinglayer::primitive2d::BorderLine(fDistance, aColorGap),
- drawinglayer::primitive2d::BorderLine(fRightWidth, aColorRight, fExtendRightStart, fExtendRightEnd),
+ drawinglayer::primitive2d::BorderLine(
+ fLeftWidth,
+ aColorLeft,
+ drawinglayer::primitive2d::BorderLineExtend(
+ fExtendLeftStart,
+ fExtendLeftEnd)),
+ drawinglayer::primitive2d::BorderLine(
+ fDistance,
+ aColorGap),
+ drawinglayer::primitive2d::BorderLine(
+ fRightWidth,
+ aColorRight,
+ drawinglayer::primitive2d::BorderLineExtend(
+ fExtendRightStart,
+ fExtendRightEnd)),
bHasGapColor,
nStyle));
@@ -121,9 +133,21 @@ void DrawinglayerBorderTest::testDoublePixelProcessing()
new drawinglayer::primitive2d::BorderLinePrimitive2D(
aStart,
aEnd,
- drawinglayer::primitive2d::BorderLine(fLeftWidth, aColorLeft, fExtendLeftStart, fExtendLeftEnd),
- drawinglayer::primitive2d::BorderLine(fDistance, aColorGap),
- drawinglayer::primitive2d::BorderLine(fRightWidth, aColorRight, fExtendRightStart, fExtendRightEnd),
+ drawinglayer::primitive2d::BorderLine(
+ fLeftWidth,
+ aColorLeft,
+ drawinglayer::primitive2d::BorderLineExtend(
+ fExtendLeftStart,
+ fExtendLeftEnd)),
+ drawinglayer::primitive2d::BorderLine(
+ fDistance,
+ aColorGap),
+ drawinglayer::primitive2d::BorderLine(
+ fRightWidth,
+ aColorRight,
+ drawinglayer::primitive2d::BorderLineExtend(
+ fExtendRightStart,
+ fExtendRightEnd)),
bHasGapColor,
nStyle));