diff options
author | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-03-15 13:38:29 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-03-19 17:57:19 +0100 |
commit | 5c983682af88cba53dd02acf17d29a9f6f2ff9e5 (patch) | |
tree | 0ab92133f31d72954b6d19f620f9bcb44abde901 /drawinglayer | |
parent | daa32dca06108ac28194c611f63d1e3e34901733 (diff) |
Use bigger rectangle to be sure it will be clipped
Diffstat (limited to 'drawinglayer')
-rwxr-xr-x | drawinglayer/source/primitive2d/borderlineprimitive2d.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 66544d65a084..adb5537eda1c 100755 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -95,8 +95,7 @@ namespace drawinglayer if(isOutsideUsed() && isInsideUsed()) { - double startMax = std::max( getExtendLeftStart(), std::max( getExtendRightStart(), 0.0 ) ); - double endMax = std::max( getExtendLeftEnd(), std::max( getExtendRightEnd(), 0.0 ) ); + const double fExt = getWidth( ); // Extend a lot: it'll be clipped after // both used, double line definition. Create left and right offset xRetval.realloc(2); @@ -107,8 +106,8 @@ namespace drawinglayer { // create geometry for left const basegfx::B2DVector aLeftOff(aPerpendicular * (0.5 * (getCorrectedLeftWidth() - fWidth + 1))); - const basegfx::B2DPoint aTmpStart(getStart() + aLeftOff - ( startMax * aVector)); - const basegfx::B2DPoint aTmpEnd(getEnd() + aLeftOff + ( endMax * aVector)); + const basegfx::B2DPoint aTmpStart(getStart() + aLeftOff - ( fExt * aVector)); + const basegfx::B2DPoint aTmpEnd(getEnd() + aLeftOff + ( fExt * aVector)); basegfx::B2DPolygon aLeft; if(leftIsHairline()) @@ -152,8 +151,8 @@ namespace drawinglayer { // create geometry for right const basegfx::B2DVector aRightOff(aPerpendicular * (0.5 * (fWidth - getCorrectedRightWidth() + 1))); - const basegfx::B2DPoint aTmpStart(getStart() + aRightOff - ( startMax * aVector)); - const basegfx::B2DPoint aTmpEnd(getEnd() + aRightOff + ( endMax * aVector)); + const basegfx::B2DPoint aTmpStart(getStart() + aRightOff - ( fExt * aVector)); + const basegfx::B2DPoint aTmpEnd(getEnd() + aRightOff + ( fExt * aVector)); basegfx::B2DPolygon aRight; if(rightIsHairline()) |