| 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 "xfa/fde/fde_gedevice.h" | 7 #include "xfa/fde/fde_gedevice.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 return m_pDevice->GetWidth(); | 34 return m_pDevice->GetWidth(); |
| 35 } | 35 } |
| 36 int32_t CFDE_RenderDevice::GetHeight() const { | 36 int32_t CFDE_RenderDevice::GetHeight() const { |
| 37 return m_pDevice->GetHeight(); | 37 return m_pDevice->GetHeight(); |
| 38 } | 38 } |
| 39 FDE_HDEVICESTATE CFDE_RenderDevice::SaveState() { | 39 FDE_HDEVICESTATE CFDE_RenderDevice::SaveState() { |
| 40 m_pDevice->SaveState(); | 40 m_pDevice->SaveState(); |
| 41 return NULL; | 41 return NULL; |
| 42 } | 42 } |
| 43 void CFDE_RenderDevice::RestoreState(FDE_HDEVICESTATE hState) { | 43 void CFDE_RenderDevice::RestoreState(FDE_HDEVICESTATE hState) { |
| 44 m_pDevice->RestoreState(); | 44 m_pDevice->RestoreState(false); |
| 45 const FX_RECT& rt = m_pDevice->GetClipBox(); | 45 const FX_RECT& rt = m_pDevice->GetClipBox(); |
| 46 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), | 46 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), |
| 47 (FX_FLOAT)rt.Height()); | 47 (FX_FLOAT)rt.Height()); |
| 48 } | 48 } |
| 49 FX_BOOL CFDE_RenderDevice::SetClipRect(const CFX_RectF& rtClip) { | 49 FX_BOOL CFDE_RenderDevice::SetClipRect(const CFX_RectF& rtClip) { |
| 50 m_rtClip = rtClip; | 50 m_rtClip = rtClip; |
| 51 return m_pDevice->SetClip_Rect(FX_RECT((int32_t)FXSYS_floor(rtClip.left), | 51 return m_pDevice->SetClip_Rect(FX_RECT((int32_t)FXSYS_floor(rtClip.left), |
| 52 (int32_t)FXSYS_floor(rtClip.top), | 52 (int32_t)FXSYS_floor(rtClip.top), |
| 53 (int32_t)FXSYS_ceil(rtClip.right()), | 53 (int32_t)FXSYS_ceil(rtClip.right()), |
| 54 (int32_t)FXSYS_ceil(rtClip.bottom()))); | 54 (int32_t)FXSYS_ceil(rtClip.bottom()))); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 const CFX_Matrix* pMatrix) { | 327 const CFX_Matrix* pMatrix) { |
| 328 CFDE_Path* pGePath = (CFDE_Path*)pPath; | 328 CFDE_Path* pGePath = (CFDE_Path*)pPath; |
| 329 if (!pGePath) | 329 if (!pGePath) |
| 330 return FALSE; | 330 return FALSE; |
| 331 if (!pBrush) | 331 if (!pBrush) |
| 332 return FALSE; | 332 return FALSE; |
| 333 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, | 333 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, |
| 334 pBrush->GetColor(), 0, FXFILL_WINDING); | 334 pBrush->GetColor(), 0, FXFILL_WINDING); |
| 335 } | 335 } |
| 336 | 336 |
| OLD | NEW |