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 18 matching lines...) Expand all Loading... |
29 FX_Free(m_pCharPos); | 29 FX_Free(m_pCharPos); |
30 if (m_bOwnerDevice) | 30 if (m_bOwnerDevice) |
31 delete m_pDevice; | 31 delete m_pDevice; |
32 } | 32 } |
33 int32_t CFDE_RenderDevice::GetWidth() const { | 33 int32_t CFDE_RenderDevice::GetWidth() const { |
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 void CFDE_RenderDevice::SaveState() { |
40 m_pDevice->SaveState(); | 40 m_pDevice->SaveState(); |
41 return NULL; | |
42 } | 41 } |
43 void CFDE_RenderDevice::RestoreState(FDE_HDEVICESTATE hState) { | 42 void CFDE_RenderDevice::RestoreState() { |
44 m_pDevice->RestoreState(false); | 43 m_pDevice->RestoreState(false); |
45 const FX_RECT& rt = m_pDevice->GetClipBox(); | 44 const FX_RECT& rt = m_pDevice->GetClipBox(); |
46 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), | 45 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), |
47 (FX_FLOAT)rt.Height()); | 46 (FX_FLOAT)rt.Height()); |
48 } | 47 } |
49 FX_BOOL CFDE_RenderDevice::SetClipRect(const CFX_RectF& rtClip) { | 48 FX_BOOL CFDE_RenderDevice::SetClipRect(const CFX_RectF& rtClip) { |
50 m_rtClip = rtClip; | 49 m_rtClip = rtClip; |
51 return m_pDevice->SetClip_Rect(FX_RECT((int32_t)FXSYS_floor(rtClip.left), | 50 return m_pDevice->SetClip_Rect(FX_RECT((int32_t)FXSYS_floor(rtClip.left), |
52 (int32_t)FXSYS_floor(rtClip.top), | 51 (int32_t)FXSYS_floor(rtClip.top), |
53 (int32_t)FXSYS_ceil(rtClip.right()), | 52 (int32_t)FXSYS_ceil(rtClip.right()), |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 const CFX_Matrix* pMatrix) { | 323 const CFX_Matrix* pMatrix) { |
325 CFDE_Path* pGePath = (CFDE_Path*)pPath; | 324 CFDE_Path* pGePath = (CFDE_Path*)pPath; |
326 if (!pGePath) | 325 if (!pGePath) |
327 return FALSE; | 326 return FALSE; |
328 if (!pBrush) | 327 if (!pBrush) |
329 return FALSE; | 328 return FALSE; |
330 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, | 329 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, |
331 pBrush->GetColor(), 0, FXFILL_WINDING); | 330 pBrush->GetColor(), 0, FXFILL_WINDING); |
332 } | 331 } |
333 | 332 |
OLD | NEW |