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 "core/include/fxge/fx_ge.h" | 7 #include "core/include/fxge/fx_ge.h" |
8 | 8 |
9 CFX_RenderDevice::CFX_RenderDevice() { | 9 CFX_RenderDevice::CFX_RenderDevice() { |
10 m_pDeviceDriver = NULL; | 10 m_pDeviceDriver = NULL; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 if (fill_mode & FXFILL_NOPATHSMOOTH) { | 217 if (fill_mode & FXFILL_NOPATHSMOOTH) { |
218 smooth_path |= FXFILL_NOPATHSMOOTH; | 218 smooth_path |= FXFILL_NOPATHSMOOTH; |
219 } | 219 } |
220 m_pDeviceDriver->DrawPath(&newPath, pMatrix, &graphState, 0, strokecolor, | 220 m_pDeviceDriver->DrawPath(&newPath, pMatrix, &graphState, 0, strokecolor, |
221 smooth_path, alpha_flag, pIccTransform, | 221 smooth_path, alpha_flag, pIccTransform, |
222 blend_type); | 222 blend_type); |
223 } | 223 } |
224 } | 224 } |
225 if ((fill_mode & 3) && fill_alpha && stroke_alpha < 0xff && | 225 if ((fill_mode & 3) && fill_alpha && stroke_alpha < 0xff && |
226 (fill_mode & FX_FILL_STROKE)) { | 226 (fill_mode & FX_FILL_STROKE)) { |
227 if (m_RenderCaps & FXRC_FILLSTROKE_PATH) { | |
228 return m_pDeviceDriver->DrawPath(pPathData, pObject2Device, pGraphState, | |
229 fill_color, stroke_color, fill_mode, | |
230 alpha_flag, pIccTransform, blend_type); | |
231 } | |
227 if (!(m_RenderCaps & FXRC_GET_BITS)) { | 232 if (!(m_RenderCaps & FXRC_GET_BITS)) { |
dsinclair
2016/03/24 17:43:38
similar, can this be moved to a function with a no
caryclark
2016/03/25 20:47:56
Done.
| |
228 return FALSE; | 233 return FALSE; |
229 } | 234 } |
230 CFX_FloatRect bbox; | 235 CFX_FloatRect bbox; |
231 if (pGraphState) { | 236 if (pGraphState) { |
232 bbox = pPathData->GetBoundingBox(pGraphState->m_LineWidth, | 237 bbox = pPathData->GetBoundingBox(pGraphState->m_LineWidth, |
233 pGraphState->m_MiterLimit); | 238 pGraphState->m_MiterLimit); |
234 } else { | 239 } else { |
235 bbox = pPathData->GetBoundingBox(); | 240 bbox = pPathData->GetBoundingBox(); |
236 } | 241 } |
237 if (pObject2Device) { | 242 if (pObject2Device) { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
465 return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix, | 470 return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix, |
466 flags, handle, alpha_flag, pIccTransform, | 471 flags, handle, alpha_flag, pIccTransform, |
467 blend_mode); | 472 blend_mode); |
468 } | 473 } |
469 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) { | 474 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) { |
470 return m_pDeviceDriver->ContinueDIBits(handle, pPause); | 475 return m_pDeviceDriver->ContinueDIBits(handle, pPause); |
471 } | 476 } |
472 void CFX_RenderDevice::CancelDIBits(void* handle) { | 477 void CFX_RenderDevice::CancelDIBits(void* handle) { |
473 m_pDeviceDriver->CancelDIBits(handle); | 478 m_pDeviceDriver->CancelDIBits(handle); |
474 } | 479 } |
OLD | NEW |