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 |
11 #include "xfa/fde/fde_geobject.h" | 11 #include "xfa/fde/fde_geobject.h" |
12 #include "xfa/fde/fde_image.h" | |
13 #include "xfa/fde/fde_object.h" | 12 #include "xfa/fde/fde_object.h" |
14 | 13 |
15 IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap* pBitmap, | 14 IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap* pBitmap, |
16 FX_BOOL bRgbByteOrder) { | 15 FX_BOOL bRgbByteOrder) { |
17 if (pBitmap == NULL) { | 16 if (pBitmap == NULL) { |
18 return NULL; | 17 return NULL; |
19 } | 18 } |
20 CFX_FxgeDevice* pDevice = new CFX_FxgeDevice; | 19 CFX_FxgeDevice* pDevice = new CFX_FxgeDevice; |
21 pDevice->Attach(pBitmap, 0, bRgbByteOrder); | 20 pDevice->Attach(pBitmap, 0, bRgbByteOrder); |
22 return new CFDE_FxgeDevice(pDevice, TRUE); | 21 return new CFDE_FxgeDevice(pDevice, TRUE); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 const CFX_Matrix* pMatrix) { | 337 const CFX_Matrix* pMatrix) { |
339 CFDE_Path* pGePath = (CFDE_Path*)pPath; | 338 CFDE_Path* pGePath = (CFDE_Path*)pPath; |
340 if (!pGePath) | 339 if (!pGePath) |
341 return FALSE; | 340 return FALSE; |
342 if (!pBrush) | 341 if (!pBrush) |
343 return FALSE; | 342 return FALSE; |
344 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, | 343 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, |
345 pBrush->GetColor(), 0, FXFILL_WINDING); | 344 pBrush->GetColor(), 0, FXFILL_WINDING); |
346 } | 345 } |
347 | 346 |
OLD | NEW |