Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: printing/emf_win.cc

Issue 1113113002: vs2015: avoid int->float warning in printing/emf_win.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2015-midi-usb
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/emf_win.cc
diff --git a/printing/emf_win.cc b/printing/emf_win.cc
index 030d5203f402f95074c7f9cffd823cf52e00e77c..7e1866b19c59346953277095253e28ddcab9cf35 100644
--- a/printing/emf_win.cc
+++ b/printing/emf_win.cc
@@ -543,8 +543,8 @@ scoped_ptr<Emf> Emf::RasterizeMetafile(int raster_area_in_pixels) const {
XFORM xform = {
float(page_bounds.width()) / bitmap_rect.width(), 0,
0, float(page_bounds.height()) / bitmap_rect.height(),
- page_bounds.x(),
- page_bounds.y(),
+ static_cast<float>(page_bounds.x()),
+ static_cast<float>(page_bounds.y()),
};
::SetWorldTransform(hdc, &xform);
::BitBlt(hdc, 0, 0, bitmap_rect.width(), bitmap_rect.height(),
@@ -566,7 +566,12 @@ scoped_ptr<Emf> Emf::RasterizeAlphaBlend() const {
RasterBitmap bitmap(page_bounds.size());
// Map metafile page_bounds.x(), page_bounds.y() to bitmap 0, 0.
- XFORM xform = { 1, 0, 0, 1, -page_bounds.x(), -page_bounds.y()};
+ XFORM xform = {1,
+ 0,
+ 0,
+ 1,
+ static_cast<float>(-page_bounds.x()),
+ static_cast<float>(-page_bounds.y())};
::SetWorldTransform(bitmap.context(), &xform);
scoped_ptr<Emf> result(new Emf);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698