diff options
author | Marko Njezic <unknown> | 2012-01-18 22:06:38 +0100 |
---|---|---|
committer | Marko Njezic <unknown> | 2012-01-18 22:06:38 +0100 |
commit | 77f31dbbadb45f7269d9dee64da33db1f197dd6c (patch) | |
tree | 614f69c326dfd19487c284ff27178dcd19483fec /src/Editor.cxx | |
parent | 4d0bdd15b57bff55cfcc58eb4ab91ccdf55d1c51 (diff) | |
download | scintilla-mirror-77f31dbbadb45f7269d9dee64da33db1f197dd6c.tar.gz |
Add fractional positioning support to some of the remaining places.
This improves sub-pixel alignment when drawing control characters, indicators
and whitespace dots.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index b1947c151..4fce8bb2d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2224,7 +2224,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou bool lastSegItalics = false; Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; - int ctrlCharWidth[32] = {0}; + XYPOSITION ctrlCharWidth[32] = {0}; bool isControlNext = IsControlCharacter(ll->chars[0]); int trailBytes = 0; bool isBadUTFNext = IsUnicodeMode() && BadUTF(ll->chars, numCharsInLine, trailBytes); @@ -2618,7 +2618,7 @@ void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, Lin void Editor::DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, ViewStyle &vsDraw, int xStart, PRectangle rcLine, LineLayout *ll, int subLine) { - const int subLineStart = ll->positions[ll->LineStart(subLine)]; + const XYPOSITION subLineStart = ll->positions[ll->LineStart(subLine)]; PRectangle rcIndic( ll->positions[startPos] + xStart - subLineStart, rcLine.top + vsDraw.maxAscent, @@ -3080,7 +3080,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis if (vsDraw.whitespaceForegroundSet) textFore = vsDraw.whitespaceForeground; if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { - int xmid = (ll->positions[cpos + startseg] + ll->positions[cpos + startseg + 1]) / 2; + XYPOSITION xmid = (ll->positions[cpos + startseg] + ll->positions[cpos + startseg + 1]) / 2; if (!twoPhaseDraw && drawWhitespaceBackground && (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { textBack = vsDraw.whitespaceBackground; |