diff options
author | nyamatongwe <unknown> | 2001-09-07 08:01:30 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-09-07 08:01:30 +0000 |
commit | e8dd68d54a56f505c1cdd901c31a4629ba19b524 (patch) | |
tree | ff44f1a8ea2ef437516aafcf704e5d24cf096f8e /src/LineMarker.cxx | |
parent | 30f4bacfe06eb177307585e54398a8ac7288448b (diff) | |
download | scintilla-mirror-e8dd68d54a56f505c1cdd901c31a4629ba19b524.tar.gz |
Marker can be any character.
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r-- | src/LineMarker.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index dc1468d83..9cb5d0d79 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -40,7 +40,7 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C surface->FillRectangle(rcH, fore); } -void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) { +void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter) { // Restrict most shapes a bit PRectangle rc = rcWhole; rc.top++; @@ -230,6 +230,16 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) { surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); + } else if (markType >= SC_MARK_CHARACTER) { + char character[2]; + character[0] = ' '; + character[0] = markType - SC_MARK_CHARACTER; + int width = surface->WidthText(fontForCharacter, character, 1); + rc.left += (rc.Width() - width) / 2; + rc.right = rc.left + width; + surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2, + character, 1, fore.allocated, back.allocated); + } else { // SC_MARK_SHORTARROW Point pts[] = { Point(centreX, centreY + dimOn2), |