summaryrefslogtreecommitdiffstats
path: root/scintilla/src/Indicator.cxx
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2016-12-04 18:20:31 +0200
committerXhmikosR <xhmikosr@gmail.com>2016-12-04 18:24:16 +0200
commit4b604e07bbbf07d3d5ad04e65f0cef56959e3807 (patch)
tree44a5924e0ef508167b285c8016e6394992153817 /scintilla/src/Indicator.cxx
parenta3ee58329361322b321ee2a708e793b1a5e5729a (diff)
downloadnotepad2-mod-master.zip
notepad2-mod-master.tar.gz
notepad2-mod-master.tar.bz2
Update Scintilla to v3.7.1.HEADorigin/masterorigin/HEADmaster
Diffstat (limited to 'scintilla/src/Indicator.cxx')
-rw-r--r--scintilla/src/Indicator.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/scintilla/src/Indicator.cxx b/scintilla/src/Indicator.cxx
index bae8130..3fa4588 100644
--- a/scintilla/src/Indicator.cxx
+++ b/scintilla/src/Indicator.cxx
@@ -24,7 +24,7 @@ static PRectangle PixelGridAlign(const PRectangle &rc) {
return PRectangle::FromInts(int(rc.left + 0.5), int(rc.top), int(rc.right + 0.5), int(rc.bottom));
}
-void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, DrawState drawState, int value) const {
+void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const {
StyleAndColour sacDraw = sacNormal;
if (Flags() & SC_INDICFLAG_VALUEFORE) {
sacDraw.fore = value & SC_INDICVALUEMASK;
@@ -170,6 +170,19 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
} else if (sacDraw.style == INDIC_COMPOSITIONTHIN) {
PRectangle rcComposition(rc.left+1, rcLine.bottom-2, rc.right-1, rcLine.bottom-1);
surface->FillRectangle(rcComposition, sacDraw.fore);
+ } else if (sacDraw.style == INDIC_POINT || sacDraw.style == INDIC_POINTCHARACTER) {
+ if (rcCharacter.Width() >= 0.1) {
+ const int pixelHeight = static_cast<int>(rc.Height() - 1.0f); // 1 pixel onto next line if multiphase
+ const XYPOSITION x = (sacDraw.style == INDIC_POINT) ? (rcCharacter.left) : ((rcCharacter.right + rcCharacter.left) / 2);
+ const int ix = static_cast<int>(x + 0.5f);
+ const int iy = static_cast<int>(rc.top + 1.0f);
+ Point pts[] = {
+ Point::FromInts(ix - pixelHeight, iy + pixelHeight), // Left
+ Point::FromInts(ix + pixelHeight, iy + pixelHeight), // Right
+ Point::FromInts(ix, iy) // Top
+ };
+ surface->Polygon(pts, 3, sacDraw.fore, sacDraw.fore);
+ }
} else { // Either INDIC_PLAIN or unknown
surface->MoveTo(static_cast<int>(rc.left), ymid);
surface->LineTo(static_cast<int>(rc.right), ymid);