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

Side by Side Diff: core/fxge/win32/fx_win32_print.cpp

Issue 2223213002: Refactor fx_ge part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxge/include/fx_ge.h"
8
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 7 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
dsinclair 2016/08/09 14:14:35 fx_system.h
npm 2016/08/09 16:26:12 Done.
10 8
11 #include <windows.h> 9 #include <windows.h>
12 10
13 #include <algorithm> 11 #include <algorithm>
14 12
15 #include "core/fxge/dib/dib_int.h" 13 #include "core/fxge/dib/dib_int.h"
16 #include "core/fxge/ge/fx_text_int.h" 14 #include "core/fxge/ge/fx_text_int.h"
17 #include "core/fxge/include/fx_freetype.h" 15 #include "core/fxge/include/fx_freetype.h"
16 #include "core/fxge/include/cfx_renderdevice.h"
18 #include "core/fxge/include/cfx_windowsdevice.h" 17 #include "core/fxge/include/cfx_windowsdevice.h"
19 #include "core/fxge/win32/win32_int.h" 18 #include "core/fxge/win32/win32_int.h"
20 19
21 #if defined(PDFIUM_PRINT_TEXT_WITH_GDI) 20 #if defined(PDFIUM_PRINT_TEXT_WITH_GDI)
22 namespace { 21 namespace {
23 22
24 class ScopedState { 23 class ScopedState {
25 public: 24 public:
26 ScopedState(HDC hDC, HFONT hFont) : m_hDC(hDC) { 25 ScopedState(HDC hDC, HFONT hFont) : m_hDC(hDC) {
27 m_iState = SaveDC(m_hDC); 26 m_iState = SaveDC(m_hDC);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // Try to get the font and draw again. 308 // Try to get the font and draw again.
310 g_pdfium_typeface_accessible_func(&lf, wsText.c_str(), nChars); 309 g_pdfium_typeface_accessible_func(&lf, wsText.c_str(), nChars);
311 return ExtTextOutW(m_hDC, 0, 0, ETO_GLYPH_INDEX, nullptr, wsText.c_str(), 310 return ExtTextOutW(m_hDC, 0, 0, ETO_GLYPH_INDEX, nullptr, wsText.c_str(),
312 nChars, nullptr); 311 nChars, nullptr);
313 #else 312 #else
314 return FALSE; 313 return FALSE;
315 #endif 314 #endif
316 } 315 }
317 316
318 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 317 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698