| OLD | NEW |
| 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 CFX_RenderDevice::CFX_RenderDevice() | 8 CFX_RenderDevice::CFX_RenderDevice() |
| 9 { | 9 { |
| 10 m_pDeviceDriver = NULL; | 10 m_pDeviceDriver = NULL; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 return m_pDeviceDriver->GetDeviceCaps(caps_id); | 57 return m_pDeviceDriver->GetDeviceCaps(caps_id); |
| 58 } | 58 } |
| 59 CFX_Matrix CFX_RenderDevice::GetCTM() const | 59 CFX_Matrix CFX_RenderDevice::GetCTM() const |
| 60 { | 60 { |
| 61 return m_pDeviceDriver->GetCTM(); | 61 return m_pDeviceDriver->GetCTM(); |
| 62 } | 62 } |
| 63 FX_BOOL CFX_RenderDevice::CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int width,
int height) const | 63 FX_BOOL CFX_RenderDevice::CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int width,
int height) const |
| 64 { | 64 { |
| 65 if (m_RenderCaps & FXRC_CMYK_OUTPUT) { | 65 if (m_RenderCaps & FXRC_CMYK_OUTPUT) { |
| 66 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FX
DIB_Cmyka : FXDIB_Cmyk); | 66 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FX
DIB_Cmyka : FXDIB_Cmyk); |
| 67 } else if (m_RenderCaps & FXRC_BYTEMASK_OUTPUT) { | 67 } |
| 68 if (m_RenderCaps & FXRC_BYTEMASK_OUTPUT) { |
| 68 return pDIB->Create(width, height, FXDIB_8bppMask); | 69 return pDIB->Create(width, height, FXDIB_8bppMask); |
| 69 } else | 70 } |
| 70 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 71 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
| 71 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FX
DIB_Argb : FXDIB_Rgb32); | 72 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FXDIB_
Argb : FXDIB_Rgb32); |
| 72 #else | 73 #else |
| 73 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FX
DIB_Argb : FXDIB_Rgb); | 74 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FXDIB_
Argb : FXDIB_Rgb); |
| 74 #endif | 75 #endif |
| 75 } | 76 } |
| 76 FX_BOOL CFX_RenderDevice::SetClip_PathFill(const CFX_PathData* pPathData, | 77 FX_BOOL CFX_RenderDevice::SetClip_PathFill(const CFX_PathData* pPathData, |
| 77 const CFX_AffineMatrix* pObject2Device, | 78 const CFX_AffineMatrix* pObject2Device, |
| 78 int fill_mode | 79 int fill_mode |
| 79 ) | 80 ) |
| 80 { | 81 { |
| 81 if (!m_pDeviceDriver->SetClip_PathFill(pPathData, pObject2Device, fill_mode)
) { | 82 if (!m_pDeviceDriver->SetClip_PathFill(pPathData, pObject2Device, fill_mode)
) { |
| 82 return FALSE; | 83 return FALSE; |
| 83 } | 84 } |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix, fl
ags, handle, alpha_flag, pIccTransform, blend_mode); | 393 return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix, fl
ags, handle, alpha_flag, pIccTransform, blend_mode); |
| 393 } | 394 } |
| 394 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) | 395 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) |
| 395 { | 396 { |
| 396 return m_pDeviceDriver->ContinueDIBits(handle, pPause); | 397 return m_pDeviceDriver->ContinueDIBits(handle, pPause); |
| 397 } | 398 } |
| 398 void CFX_RenderDevice::CancelDIBits(void* handle) | 399 void CFX_RenderDevice::CancelDIBits(void* handle) |
| 399 { | 400 { |
| 400 m_pDeviceDriver->CancelDIBits(handle); | 401 m_pDeviceDriver->CancelDIBits(handle); |
| 401 } | 402 } |
| OLD | NEW |