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

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

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 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
« no previous file with comments | « core/src/fxge/win32/fx_win32_gdipext.cpp ('k') | core/src/fxge/win32/win32_int.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
9 #include <windows.h> 9 #include <windows.h>
10 #include "../../../include/fxge/fx_ge_win32.h" 10 #include "../../../include/fxge/fx_ge_win32.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 return FALSE; 296 return FALSE;
297 } 297 }
298 ((CPSOutput*)m_pPSOutput)->Init(); 298 ((CPSOutput*)m_pPSOutput)->Init();
299 m_PSRenderer.Init(m_pPSOutput, pslevel, m_Width, m_Height, bCmykOutput); 299 m_PSRenderer.Init(m_pPSOutput, pslevel, m_Width, m_Height, bCmykOutput);
300 m_bCmykOutput = bCmykOutput; 300 m_bCmykOutput = bCmykOutput;
301 HRGN hRgn = ::CreateRectRgn(0, 0, 1, 1); 301 HRGN hRgn = ::CreateRectRgn(0, 0, 1, 1);
302 int ret = ::GetClipRgn(hDC, hRgn); 302 int ret = ::GetClipRgn(hDC, hRgn);
303 if (ret == 1) { 303 if (ret == 1) {
304 ret = ::GetRegionData(hRgn, 0, NULL); 304 ret = ::GetRegionData(hRgn, 0, NULL);
305 if (ret) { 305 if (ret) {
306 RGNDATA* pData = (RGNDATA*)FX_Alloc(FX_BYTE, ret); 306 RGNDATA* pData = (RGNDATA*)FX_Alloc(uint8_t, ret);
307 ret = ::GetRegionData(hRgn, ret, pData); 307 ret = ::GetRegionData(hRgn, ret, pData);
308 if (ret) { 308 if (ret) {
309 CFX_PathData path; 309 CFX_PathData path;
310 path.AllocPointCount(pData->rdh.nCount * 5); 310 path.AllocPointCount(pData->rdh.nCount * 5);
311 for (FX_DWORD i = 0; i < pData->rdh.nCount; i ++) { 311 for (FX_DWORD i = 0; i < pData->rdh.nCount; i ++) {
312 RECT* pRect = (RECT*)(pData->Buffer + pData->rdh.nRgnSize * i); 312 RECT* pRect = (RECT*)(pData->Buffer + pData->rdh.nRgnSize * i);
313 path.AppendRect((FX_FLOAT)pRect->left, (FX_FLOAT)pRect->bott om, (FX_FLOAT)pRect->right, (FX_FLOAT)pRect->top); 313 path.AppendRect((FX_FLOAT)pRect->left, (FX_FLOAT)pRect->bott om, (FX_FLOAT)pRect->right, (FX_FLOAT)pRect->top);
314 } 314 }
315 m_PSRenderer.SetClip_PathFill(&path, NULL, FXFILL_WINDING); 315 m_PSRenderer.SetClip_PathFill(&path, NULL, FXFILL_WINDING);
316 } 316 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 handle = NULL; 414 handle = NULL;
415 return m_PSRenderer.DrawDIBits(pBitmap, color, pMatrix, render_flags, alpha_ flag, pIccTransform); 415 return m_PSRenderer.DrawDIBits(pBitmap, color, pMatrix, render_flags, alpha_ flag, pIccTransform);
416 } 416 }
417 FX_BOOL CPSPrinterDriver::DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pChar Pos, CFX_Font* pFont, 417 FX_BOOL CPSPrinterDriver::DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pChar Pos, CFX_Font* pFont,
418 CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color, 418 CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
419 int alpha_flag, void* pIccTransform) 419 int alpha_flag, void* pIccTransform)
420 { 420 {
421 return m_PSRenderer.DrawText(nChars, pCharPos, pFont, pCache, pObject2Device , font_size, color, alpha_flag, pIccTransform); 421 return m_PSRenderer.DrawText(nChars, pCharPos, pFont, pCache, pObject2Device , font_size, color, alpha_flag, pIccTransform);
422 } 422 }
423 #endif 423 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/win32/fx_win32_gdipext.cpp ('k') | core/src/fxge/win32/win32_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698