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_page/pageint.h" | 7 #include "core/fpdfapi/fpdf_page/pageint.h" |
8 | 8 |
9 #include <limits.h> | 9 #include <limits.h> |
10 | 10 |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 m_pParser.reset(new CPDF_StreamContentParser( | 704 m_pParser.reset(new CPDF_StreamContentParser( |
705 pForm->m_pDocument, pForm->m_pPageResources, pForm->m_pResources, | 705 pForm->m_pDocument, pForm->m_pPageResources, pForm->m_pResources, |
706 pParentMatrix, pForm, pResources, &form_bbox, pGraphicStates, level)); | 706 pParentMatrix, pForm, pResources, &form_bbox, pGraphicStates, level)); |
707 m_pParser->GetCurStates()->m_CTM = form_matrix; | 707 m_pParser->GetCurStates()->m_CTM = form_matrix; |
708 m_pParser->GetCurStates()->m_ParentMatrix = form_matrix; | 708 m_pParser->GetCurStates()->m_ParentMatrix = form_matrix; |
709 if (ClipPath) { | 709 if (ClipPath) { |
710 m_pParser->GetCurStates()->m_ClipPath.AppendPath(ClipPath, FXFILL_WINDING, | 710 m_pParser->GetCurStates()->m_ClipPath.AppendPath(ClipPath, FXFILL_WINDING, |
711 TRUE); | 711 TRUE); |
712 } | 712 } |
713 if (pForm->m_Transparency & PDFTRANS_GROUP) { | 713 if (pForm->m_Transparency & PDFTRANS_GROUP) { |
714 CPDF_GeneralStateData* pData = | 714 CPDF_GeneralState* pState = &m_pParser->GetCurStates()->m_GeneralState; |
715 m_pParser->GetCurStates()->m_GeneralState.GetPrivateCopy(); | 715 pState->SetBlendType(FXDIB_BLEND_NORMAL); |
716 pData->m_BlendType = FXDIB_BLEND_NORMAL; | 716 pState->SetStrokeAlpha(1.0f); |
717 pData->m_StrokeAlpha = 1.0f; | 717 pState->SetFillAlpha(1.0f); |
718 pData->m_FillAlpha = 1.0f; | 718 pState->SetSoftMask(nullptr); |
719 pData->m_pSoftMask = nullptr; | |
720 } | 719 } |
721 m_nStreams = 0; | 720 m_nStreams = 0; |
722 m_pSingleStream.reset(new CPDF_StreamAcc); | 721 m_pSingleStream.reset(new CPDF_StreamAcc); |
723 m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE); | 722 m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE); |
724 m_pData = (uint8_t*)m_pSingleStream->GetData(); | 723 m_pData = (uint8_t*)m_pSingleStream->GetData(); |
725 m_Size = m_pSingleStream->GetSize(); | 724 m_Size = m_pSingleStream->GetSize(); |
726 m_Status = ToBeContinued; | 725 m_Status = ToBeContinued; |
727 m_InternalStage = STAGE_PARSE; | 726 m_InternalStage = STAGE_PARSE; |
728 m_CurrentOffset = 0; | 727 m_CurrentOffset = 0; |
729 } | 728 } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 } | 817 } |
819 m_Status = Done; | 818 m_Status = Done; |
820 return; | 819 return; |
821 } | 820 } |
822 steps++; | 821 steps++; |
823 if (pPause && pPause->NeedToPauseNow()) { | 822 if (pPause && pPause->NeedToPauseNow()) { |
824 break; | 823 break; |
825 } | 824 } |
826 } | 825 } |
827 } | 826 } |
OLD | NEW |