diff options
author | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-16 01:39:42 +0000 |
---|---|---|
committer | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-16 01:39:42 +0000 |
commit | 8f17cd3e165a4d0cc9a03c029ee5f4d39c5e77e7 (patch) | |
tree | fba63800e4b02432be8c45673e32f234d69cce9e /chrome/utility | |
parent | 0da15e586f92f3488658034bfef5ecbf42656791 (diff) | |
download | chromium_src-8f17cd3e165a4d0cc9a03c029ee5f4d39c5e77e7.zip chromium_src-8f17cd3e165a4d0cc9a03c029ee5f4d39c5e77e7.tar.gz chromium_src-8f17cd3e165a4d0cc9a03c029ee5f4d39c5e77e7.tar.bz2 |
Unifying NativeMetafile class interface (as much as possible) for Linux, Mac, Win
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6611032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility')
-rw-r--r-- | chrome/utility/utility_thread.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/utility/utility_thread.cc b/chrome/utility/utility_thread.cc index d9fd576..91b1574 100644 --- a/chrome/utility/utility_thread.cc +++ b/chrome/utility/utility_thread.cc @@ -263,12 +263,12 @@ bool UtilityThread::RenderPDFToWinMetafile( // Since we created the metafile using the screen DPI (but we actually want // the PDF DLL to print using the passed in render_dpi, we apply the following // transformation. - SetGraphicsMode(metafile->hdc(), GM_ADVANCED); + SetGraphicsMode(metafile->context(), GM_ADVANCED); XFORM xform = {0}; int screen_dpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSX); xform.eM11 = xform.eM22 = static_cast<float>(screen_dpi) / static_cast<float>(render_dpi); - ModifyWorldTransform(metafile->hdc(), &xform, MWT_LEFTMULTIPLY); + ModifyWorldTransform(metafile->context(), &xform, MWT_LEFTMULTIPLY); bool ret = false; std::vector<printing::PageRange>::const_iterator iter; @@ -278,16 +278,16 @@ bool UtilityThread::RenderPDFToWinMetafile( break; metafile->StartPage(); if (render_proc(&buffer.front(), buffer.size(), page_number, - metafile->hdc(), render_dpi, render_dpi, + metafile->context(), render_dpi, render_dpi, render_area.x(), render_area.y(), render_area.width(), render_area.height(), true, false, true, true)) if (*highest_rendered_page_number < page_number) *highest_rendered_page_number = page_number; ret = true; - metafile->EndPage(); + metafile->FinishPage(); } } - metafile->CloseDc(); + metafile->Close(); return ret; } #endif // defined(OS_WIN) |