diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-11-27 11:51:32 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-11-27 12:02:56 +0100 |
commit | f305861b1be589ff6854be2f72541398b61c637b (patch) | |
tree | 6eefeeebea29e9e4b0eda9a6a7a65beea4ac4b19 /basegfx | |
parent | 507d348454f6fd2d6475d2878bbc56efd9d73ca1 (diff) |
EMF+: Line thickness has to be considered when drawing the caps.
Change-Id: I6043ee3c214f453afaef06125993c73be624c07e
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dlinegeometry.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx index 5c016bba65d8..417944dde525 100644 --- a/basegfx/source/polygon/b2dlinegeometry.cxx +++ b/basegfx/source/polygon/b2dlinegeometry.cxx @@ -44,7 +44,8 @@ namespace basegfx double fWidth, double fCandidateLength, double fDockingPosition, // 0->top, 1->bottom - double* pConsumedLength) + double* pConsumedLength, + double fShift) { B2DPolyPolygon aRetval; OSL_ENSURE(rCandidate.count() > 1L, "createAreaGeometryForLineStartEnd: Line polygon has too less points (!)"); @@ -89,7 +90,7 @@ namespace basegfx const double fArrowYLength(B2DVector(aUpperCenter).getLength()); // move arrow to have docking position centered - aArrowTransform.translate(0.0, -fArrowYLength * fDockingPosition); + aArrowTransform.translate(0.0, -fArrowYLength * fDockingPosition + fShift); // prepare polygon length if(fTools::equalZero(fCandidateLength)) @@ -98,7 +99,7 @@ namespace basegfx } // get the polygon vector we want to plant this arrow on - const double fConsumedLength(fArrowYLength * (1.0 - fDockingPosition)); + const double fConsumedLength(fArrowYLength * (1.0 - fDockingPosition) - fShift); const B2DVector aHead(rCandidate.getB2DPoint((bStart) ? 0L : rCandidate.count() - 1L)); const B2DVector aTail(getPositionAbsolute(rCandidate, (bStart) ? fConsumedLength : fCandidateLength - fConsumedLength, fCandidateLength)); |