aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-02-29 21:47:16 +1100
committernyamatongwe <devnull@localhost>2012-02-29 21:47:16 +1100
commit9c74efe984f4027ffb9ea6af58ed818ab5f2ff6c (patch)
tree1af7e0ca847aa0a3d8a089c5901971880fecf71c /win32/PlatWin.cxx
parent50bab1cc760155a45188c8c25e89eff62702348f (diff)
downloadscintilla-mirror-9c74efe984f4027ffb9ea6af58ed818ab5f2ff6c.tar.gz
Bug #3494202. Fix blurry RGBA markers on Direct2D when centring caused
fractional coordinates.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 3a37b3529..bf49c4d71 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -812,10 +812,10 @@ void SurfaceGDI::DrawRGBAImage(PRectangle rc, int width, int height, const unsig
if (AlphaBlendFn && rc.Width() > 0) {
HDC hMemDC = ::CreateCompatibleDC(reinterpret_cast<HDC>(hdc));
if (rc.Width() > width)
- rc.left += (rc.Width() - width) / 2;
+ rc.left += static_cast<int>((rc.Width() - width) / 2);
rc.right = rc.left + width;
if (rc.Height() > height)
- rc.top += (rc.Height() - height) / 2;
+ rc.top += static_cast<int>((rc.Height() - height) / 2);
rc.bottom = rc.top + height;
BITMAPINFO bpih = {sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0};
@@ -1475,10 +1475,10 @@ void SurfaceD2D::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fil
void SurfaceD2D::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) {
if (pRenderTarget) {
if (rc.Width() > width)
- rc.left += (rc.Width() - width) / 2;
+ rc.left += static_cast<int>((rc.Width() - width) / 2);
rc.right = rc.left + width;
if (rc.Height() > height)
- rc.top += (rc.Height() - height) / 2;
+ rc.top += static_cast<int>((rc.Height() - height) / 2);
rc.bottom = rc.top + height;
std::vector<unsigned char> image(height * width * 4);