diff options
author | Neil <nyamatongwe@gmail.com> | 2014-01-18 10:41:22 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-01-18 10:41:22 +1100 |
commit | a285d5a30827d68ec10d6333907cdf905ee8507c (patch) | |
tree | 2fed5947c4e909abd4c8d208f145e1699b98e4e6 | |
parent | e021c0d7a7cabfd586b3563ca170d01075aa8ceb (diff) | |
download | scintilla-mirror-a285d5a30827d68ec10d6333907cdf905ee8507c.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.
-rw-r--r-- | src/LineMarker.cxx | 10 |
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) { |