aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-01-18 10:41:22 +1100
committerNeil <nyamatongwe@gmail.com>2014-01-18 10:41:22 +1100
commit39b6301d325041d26de89e8ed2e6f30929e52370 (patch)
treee5e40c7ca2c592707b94df1326e4136c7e8c819e /src
parent865a9245c1f72eb918f682d5eb8d4367bc44cf13 (diff)
downloadscintilla-mirror-39b6301d325041d26de89e8ed2e6f30929e52370.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/LineMarker.cxx10
1 files changed, 6 insertions, 4 deletions
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) {