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/fpdfapi/fpdf_render/render_int.h" | 7 #include "core/fpdfapi/fpdf_render/render_int.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
646 m_pDevice->DrawPath(pPathData, pObj2Device, &stroke_state, 0, 0xffff0000, | 646 m_pDevice->DrawPath(pPathData, pObj2Device, &stroke_state, 0, 0xffff0000, |
647 fill_mode); | 647 fill_mode); |
648 } | 648 } |
649 } | 649 } |
650 FX_BOOL CPDF_RenderStatus::SelectClipPath(const CPDF_PathObject* pPathObj, | 650 FX_BOOL CPDF_RenderStatus::SelectClipPath(const CPDF_PathObject* pPathObj, |
651 const CFX_Matrix* pObj2Device, | 651 const CFX_Matrix* pObj2Device, |
652 FX_BOOL bStroke) { | 652 FX_BOOL bStroke) { |
653 CFX_Matrix path_matrix = pPathObj->m_Matrix; | 653 CFX_Matrix path_matrix = pPathObj->m_Matrix; |
654 path_matrix.Concat(*pObj2Device); | 654 path_matrix.Concat(*pObj2Device); |
655 if (bStroke) { | 655 if (bStroke) { |
656 CFX_GraphStateData graphState(*pPathObj->m_GraphState.GetObject()); | 656 CFX_GraphState graphState = pPathObj->m_GraphState; |
657 if (m_Options.m_Flags & RENDER_THINLINE) { | 657 if (m_Options.m_Flags & RENDER_THINLINE) |
658 graphState.m_LineWidth = 0; | 658 graphState.SetLineWidth(0); |
659 } | |
660 return m_pDevice->SetClip_PathStroke(pPathObj->m_Path.GetObject(), | 659 return m_pDevice->SetClip_PathStroke(pPathObj->m_Path.GetObject(), |
661 &path_matrix, &graphState); | 660 &path_matrix, graphState.GetObject()); |
dsinclair
2016/09/07 12:55:40
Is this copy needed or can the CFX_GraphState be p
Tom Sepez
2016/09/07 16:35:11
I'll get to that eventually. Turns out the m_pDev
| |
662 } | 661 } |
663 int fill_mode = pPathObj->m_FillType; | 662 int fill_mode = pPathObj->m_FillType; |
664 if (m_Options.m_Flags & RENDER_NOPATHSMOOTH) { | 663 if (m_Options.m_Flags & RENDER_NOPATHSMOOTH) { |
665 fill_mode |= FXFILL_NOPATHSMOOTH; | 664 fill_mode |= FXFILL_NOPATHSMOOTH; |
666 } | 665 } |
667 return m_pDevice->SetClip_PathFill(pPathObj->m_Path.GetObject(), &path_matrix, | 666 return m_pDevice->SetClip_PathFill(pPathObj->m_Path.GetObject(), &path_matrix, |
668 fill_mode); | 667 fill_mode); |
669 } | 668 } |
670 FX_BOOL CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj, | 669 FX_BOOL CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj, |
671 const CFX_Matrix* pObj2Device) { | 670 const CFX_Matrix* pObj2Device) { |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1277 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, | 1276 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, |
1278 m_Rect.top, m_Rect.Width(), m_Rect.Height()); | 1277 m_Rect.top, m_Rect.Width(), m_Rect.Height()); |
1279 } | 1278 } |
1280 } | 1279 } |
1281 | 1280 |
1282 #if defined _SKIA_SUPPORT_ | 1281 #if defined _SKIA_SUPPORT_ |
1283 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { | 1282 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { |
1284 m_pDevice->DebugVerifyBitmapIsPreMultiplied(); | 1283 m_pDevice->DebugVerifyBitmapIsPreMultiplied(); |
1285 } | 1284 } |
1286 #endif | 1285 #endif |
OLD | NEW |