summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-27 11:51:32 +0100
committerJan Holesovsky <kendy@collabora.com>2013-11-27 11:54:53 +0100
commitacd5edd3d4ee77387b9e437dc1368da080c40c03 (patch)
treee1ca3c7b98f41ac3e040610dbff346b86a8845f6 /basegfx/source
parentb5c2e38a71099a724b34697c38c64e870fe2061f (diff)
EMF+: Line thickness has to be considered when drawing the caps.
Change-Id: I6043ee3c214f453afaef06125993c73be624c07e
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/polygon/b2dlinegeometry.cxx7
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));