diff options
author | nyamatongwe <unknown> | 2009-05-27 01:58:57 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-05-27 01:58:57 +0000 |
commit | 848a31eaa6cb9de3ef52320d1e02796d22e7bdcb (patch) | |
tree | b61bc5ebffbd3ceae7652795bf0e6a845e669050 /src | |
parent | 27042b42199acb91f9f1c34aab6e98924f408a64 (diff) | |
download | scintilla-mirror-848a31eaa6cb9de3ef52320d1e02796d22e7bdcb.tar.gz |
Added SC_MARK_UNDERLINE from Stephan Deibel.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 18 | ||||
-rw-r--r-- | src/LineMarker.cxx | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index a67821147..80156e6af 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2532,6 +2532,18 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated); } + // Draw underline mark as part of background if not transparent + int marks = pdoc->GetMark(line); + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) && + (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { + PRectangle rcUnderline = rcLine; + rcUnderline.top = rcUnderline.bottom - 2; + surface->FillRectangle(rcUnderline, vsDraw.markers[markBit].back.allocated); + } + marks >>= 1; + } + inIndentation = subLine == 0; // Do not handle indentation except on first subline. // Foreground drawing loop BreakFinder bfFore(ll, lineStart, lineEnd, posLineStart, IsUnicodeMode(), xStartVisible); @@ -2748,10 +2760,14 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) { SimpleAlphaRectangle(surface, rcSegment, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha); } - int marks = pdoc->GetMark(line); + marks = pdoc->GetMark(line); for (int markBit = 0; (markBit < 32) && marks; markBit++) { if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND)) { SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha); + } else if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE)) { + PRectangle rcUnderline = rcSegment; + rcUnderline.top = rcUnderline.bottom - 2; + SimpleAlphaRectangle(surface, rcUnderline, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha); } marks >>= 1; } diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index f79c3c085..f79f4f48a 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -154,7 +154,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac rcSmall.bottom = rc.bottom - 2; surface->RectangleDraw(rcSmall, fore.allocated, back.allocated); - } else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND) { + } else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND || markType == SC_MARK_UNDERLINE) { // An invisible marker so don't draw anything } else if (markType == SC_MARK_VLINE) { |