diff options
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/borderlineprimitive2d.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 4591330655e4..66fcfaf17b9e 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -89,8 +89,11 @@ namespace drawinglayer const basegfx::B2DVector aPerpendicular(basegfx::getPerpendicular(aVector)); // Get the points - const basegfx::B2DVector aLeftOff(aPerpendicular * (-0.5 * (getWidth(rViewInformation)))); - const basegfx::B2DVector aRightOff(aPerpendicular * (0.5 * (getWidth(rViewInformation)))); + const double fWidth(getWidth(rViewInformation)); + const basegfx::B2DVector aLeftOff( + aPerpendicular * (-0.5 * std::max(fWidth, 1.0))); + const basegfx::B2DVector aRightOff( + aPerpendicular * (0.5 * std::max(fWidth, 1.0))); const basegfx::B2DVector aSLVector( aLeftOff - ( getExtendLeftStart() * aVector ) ); clipPolygon.append( basegfx::B2DPoint( getStart() + aSLVector * 2.0 ) ); |