diff options
author | Neil <nyamatongwe@gmail.com> | 2014-05-03 13:30:18 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-05-03 13:30:18 +1000 |
commit | 9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1 (patch) | |
tree | c3e24e4e33c77abd593fc7f6d88f61c07c33d57b /src/Editor.cxx | |
parent | 32cae5a3a2c79282abba21a07d60130f05d86cea (diff) | |
download | scintilla-mirror-9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1.tar.gz |
Using casts and an alternate PRectangle constructor to make XYPOSITION <-> int
conversions and other conversions more consistent.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index e96588023..946e0fe2b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2423,7 +2423,7 @@ ColourDesired Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, void Editor::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { Point from(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); - PRectangle rcCopyArea(start + 1, rcSegment.top, start + 2, rcSegment.bottom); + PRectangle rcCopyArea(start + 1, static_cast<int>(rcSegment.top), start + 2, static_cast<int>(rcSegment.bottom)); surface->Copy(rcCopyArea, from, highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); } @@ -3124,7 +3124,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis rcSegment.bottom); surface->FillRectangle(rcSpace, textBack); } - PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); + PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0.0f, 0.0f); rcDot.right = rcDot.left + vs.whitespaceSize; rcDot.bottom = rcDot.top + vs.whitespaceSize; surface->FillRectangle(rcDot, textFore); @@ -3705,7 +3705,8 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { if (bufferedDraw) { Point from(vs.textStart-leftTextOverlap, 0); PRectangle rcCopyArea(vs.textStart-leftTextOverlap, yposScreen, - rcClient.right - vs.rightMarginWidth, yposScreen + vs.lineHeight); + static_cast<int>(rcClient.right - vs.rightMarginWidth), + yposScreen + vs.lineHeight); surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); } |