aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Indicator.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-06-02 17:13:04 +1000
committernyamatongwe <unknown>2011-06-02 17:13:04 +1000
commit712c48218c8394ff69e07eebffa2ce7347041f7d (patch)
tree14d46a546263e8e49656ca9aa95541d7f55d6059 /src/Indicator.cxx
parentfb475dce0aeca96bf212998533af2248f0a182b4 (diff)
downloadscintilla-mirror-712c48218c8394ff69e07eebffa2ce7347041f7d.tar.gz
Added new indicators: dashed and dotted underlines.
Diffstat (limited to 'src/Indicator.cxx')
-rw-r--r--src/Indicator.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index 5c352bf1c..c1d07b2e6 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -73,6 +73,20 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
rcBox.left = rc.left;
rcBox.right = rc.right;
surface->AlphaRectangle(rcBox, (style == INDIC_ROUNDBOX) ? 1 : 0, fore.allocated, fillAlpha, fore.allocated, outlineAlpha, 0);
+ } else if (style == INDIC_DASH) {
+ int x = rc.left;
+ while (x < rc.right) {
+ surface->MoveTo(x, ymid);
+ surface->LineTo(Platform::Minimum(x + 4, rc.right), ymid);
+ x += 7;
+ }
+ } else if (style == INDIC_DOTS) {
+ int x = rc.left;
+ while (x < rc.right) {
+ PRectangle rcDot(x, ymid, x+1, ymid+1);
+ surface->FillRectangle(rcDot, fore.allocated);
+ x += 2;
+ }
} else { // Either INDIC_PLAIN or unknown
surface->MoveTo(rc.left, ymid);
surface->LineTo(rc.right, ymid);