From 39b6301d325041d26de89e8ed2e6f30929e52370 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 18 Jan 2014 10:41:22 +1100 Subject: For SC_MARK_ARROWS, scale the arrows to fit the line height. Avoid drawing one arm of each arrow longer than the other on Cocoa. The weight of the strokes is more uniform on Windows/Direct2D and Cairo. --- src/LineMarker.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 94513f5d0..7e08e86d2 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -355,10 +355,12 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac } else if (markType == SC_MARK_ARROWS) { surface->PenColour(fore); int right = centreX - 2; - for (int b=0; b<3; b++) { - surface->MoveTo(right - 4, centreY - 4); - surface->LineTo(right, centreY); - surface->LineTo(right - 5, centreY + 5); + const int armLength = dimOn2 - 1; + for (int b = 0; b<3; b++) { + surface->MoveTo(right, centreY); + surface->LineTo(right - armLength, centreY - armLength); + surface->MoveTo(right, centreY); + surface->LineTo(right - armLength, centreY + armLength); right += 4; } } else if (markType == SC_MARK_SHORTARROW) { -- cgit v1.2.3