summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-09-13 18:37:02 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-09-15 12:58:04 +0200
commit16fd7af90a9be159ebc7eab09083f1ef7eb64645 (patch)
tree2068f7b64609b6a231a803859297e108509ed428 /drawinglayer
parent1f02af4dbd13d79647549e1269722e2c0b67fa90 (diff)
borderline: extended the expand logic
Extended and checked the expand logic for creating the line extends. Now creating quite the right lines, will need to check some speccial cases. Also some cleanups. Change-Id: I3a3bd4d23c7017ecd873147df2d93af61de39fa6
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/borderlineprimitive2d.cxx83
1 files changed, 0 insertions, 83 deletions
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index eba1f7f0d996..6295d4673c36 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -165,89 +165,6 @@ namespace drawinglayer
}
}
-
-
-
- // static double fPatScFact(10.0); // 10.0 multiply, see old code
- // const std::vector<double> aDashing(svtools::GetLineDashing(getStyle(), getPatternScale() * fPatScFact));
- // const attribute::StrokeAttribute aStrokeAttribute(aDashing);
-
- // if (3 == getBorderLines().size())
- // {
- // // double line with gap. Use mfSmallestAllowedDiscreteGapDistance (see get2DDecomposition) as distance.
- // // That value is prepared to be at least one pixel (discrete unit) so that the
- // // decomposition is view-dependent in this cases
- // const BorderLine& rLeft(getBorderLines()[0]);
- // const BorderLine& rGap(getBorderLines()[1]);
- // const BorderLine& rRight(getBorderLines()[2]);
- // const double fFullWidth(rLeft.getWidth() + mfSmallestAllowedDiscreteGapDistance + rRight.getWidth());
-
- // {
- // // inside line (left of vector). Create stroke primitive centered on left line width
- // const double fDeltaY((rLeft.getWidth() - fFullWidth) * 0.5);
- // const basegfx::B2DVector aDeltaY(aPerpendicular * fDeltaY);
- // const basegfx::B2DPoint aStart(getStart() - (aVector * rLeft.getBorderLineExtend().getStartAverage()) + aDeltaY);
- // const basegfx::B2DPoint aEnd(getEnd() + (aVector * rLeft.getBorderLineExtend().getEndAverage()) + aDeltaY);
- // const attribute::LineAttribute aLineAttribute(rLeft.getRGBColor(), rLeft.getWidth());
-
- // addPolygonStrokePrimitive2D(
- // rContainer,
- // aStart,
- // aEnd,
- // aLineAttribute,
- // aStrokeAttribute);
- // }
-
- // if (hasGapColor())
- // {
- // // gap (if visible, found practical usage in Writer MultiColorBorderLines).
- // // Create stroke primitive on vector with given color centered on gap position
- // const double fDeltaY(((fFullWidth - mfSmallestAllowedDiscreteGapDistance) * 0.5) - rRight.getWidth());
- // const basegfx::B2DVector aDeltaY(aPerpendicular * fDeltaY);
- // const basegfx::B2DPoint aStart(getStart() - (aVector * rGap.getBorderLineExtend().getStartAverage()) + aDeltaY);
- // const basegfx::B2DPoint aEnd(getEnd() + (aVector * rGap.getBorderLineExtend().getEndAverage()) + aDeltaY);
- // const attribute::LineAttribute aLineAttribute(rGap.getRGBColor(), mfSmallestAllowedDiscreteGapDistance);
-
- // addPolygonStrokePrimitive2D(
- // rContainer,
- // aStart,
- // aEnd,
- // aLineAttribute,
- // aStrokeAttribute);
- // }
-
- // {
- // // outside line (right of vector). Create stroke primitive centered on right line width
- // const double fDeltaY((fFullWidth - rRight.getWidth()) * 0.5);
- // const basegfx::B2DVector aDeltaY(aPerpendicular * fDeltaY);
- // const basegfx::B2DPoint aStart(getStart() - (aVector * rRight.getBorderLineExtend().getStartAverage()) + aDeltaY);
- // const basegfx::B2DPoint aEnd(getEnd() + (aVector * rRight.getBorderLineExtend().getEndAverage()) + aDeltaY);
- // const attribute::LineAttribute aLineAttribute(rRight.getRGBColor(), rRight.getWidth());
-
- // addPolygonStrokePrimitive2D(
- // rContainer,
- // aStart,
- // aEnd,
- // aLineAttribute,
- // aStrokeAttribute);
- // }
- // }
- // else
- // {
- // // single line, only inside values used, no vertical offsets
- // const BorderLine& rBorderLine(getBorderLines()[0]);
- // const attribute::LineAttribute aLineAttribute(rBorderLine.getRGBColor(), rBorderLine.getWidth());
-
- // addPolygonStrokePrimitive2D(
- // rContainer,
- // getStart() - (aVector * rBorderLine.getBorderLineExtend().getStartAverage()),
- // getEnd() + (aVector * rBorderLine.getBorderLineExtend().getEndAverage()),
- // aLineAttribute,
- // aStrokeAttribute);
- // }
- // }
- // }
-
bool BorderLinePrimitive2D::isHorizontalOrVertical(const geometry::ViewInformation2D& rViewInformation) const
{
if (!getStart().equal(getEnd()))