aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-01-18 10:48:20 +1100
committerNeil <nyamatongwe@gmail.com>2014-01-18 10:48:20 +1100
commit67c5f029380f3eb0c63886644aa7e0fca8d7b0aa (patch)
tree1faf7e5d6fc182a779e1f9622ecdabbb6925757c
parent39b6301d325041d26de89e8ed2e6f30929e52370 (diff)
downloadscintilla-mirror-67c5f029380f3eb0c63886644aa7e0fca8d7b0aa.tar.gz
With Direct2D draw circles with a 1 pixel larger radius to better match
other platforms and ensure for folding markers that the '+' or '-' do not touch the circle. Change order of drawing so that circles are drawn after connecting lines so overwrite any tails.
-rw-r--r--src/LineMarker.cxx8
-rw-r--r--win32/PlatWin.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index 7e08e86d2..baa916254 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -317,17 +317,14 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
DrawPlus(surface, centreX, centreY, blobSize, tail);
} else if (markType == SC_MARK_CIRCLEMINUS) {
- DrawCircle(surface, centreX, centreY, blobSize, fore, head);
- DrawMinus(surface, centreX, centreY, blobSize, tail);
-
surface->PenColour(head);
surface->MoveTo(centreX, centreY + blobSize);
surface->LineTo(centreX, rcWhole.bottom);
- } else if (markType == SC_MARK_CIRCLEMINUSCONNECTED) {
DrawCircle(surface, centreX, centreY, blobSize, fore, head);
DrawMinus(surface, centreX, centreY, blobSize, tail);
+ } else if (markType == SC_MARK_CIRCLEMINUSCONNECTED) {
surface->PenColour(head);
surface->MoveTo(centreX, centreY + blobSize);
surface->LineTo(centreX, rcWhole.bottom);
@@ -336,6 +333,9 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
surface->MoveTo(centreX, rcWhole.top);
surface->LineTo(centreX, centreY - blobSize);
+ DrawCircle(surface, centreX, centreY, blobSize, fore, head);
+ DrawMinus(surface, centreX, centreY, blobSize, tail);
+
} else if (markType >= SC_MARK_CHARACTER) {
char character[1];
character[0] = static_cast<char>(markType - SC_MARK_CHARACTER);
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index f67bcf7fb..548d620d3 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1563,7 +1563,7 @@ void SurfaceD2D::DrawRGBAImage(PRectangle rc, int width, int height, const unsig
void SurfaceD2D::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) {
if (pRenderTarget) {
- FLOAT radius = rc.Width() / 2.0f - 1.0f;
+ FLOAT radius = rc.Width() / 2.0f;
D2D1_ELLIPSE ellipse = {
D2D1::Point2F((rc.left + rc.right) / 2.0f, (rc.top + rc.bottom) / 2.0f),
radius,radius};