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 "pageint.h" | 7 #include "pageint.h" |
8 | 8 |
9 #include "core/include/fpdfapi/fpdf_module.h" | 9 #include "core/include/fpdfapi/fpdf_module.h" |
10 #include "core/include/fpdfapi/fpdf_page.h" | 10 #include "core/include/fpdfapi/fpdf_page.h" |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 CFX_ByteStringC type = pXObject->GetDict() | 703 CFX_ByteStringC type = pXObject->GetDict() |
704 ? pXObject->GetDict()->GetConstString("Subtype") | 704 ? pXObject->GetDict()->GetConstString("Subtype") |
705 : CFX_ByteStringC(); | 705 : CFX_ByteStringC(); |
706 if (type == "Image") { | 706 if (type == "Image") { |
707 if (m_Options.m_bTextOnly) { | 707 if (m_Options.m_bTextOnly) { |
708 return; | 708 return; |
709 } | 709 } |
710 CPDF_ImageObject* pObj = AddImage(pXObject, NULL, FALSE); | 710 CPDF_ImageObject* pObj = AddImage(pXObject, NULL, FALSE); |
711 m_LastImageName = name; | 711 m_LastImageName = name; |
712 m_pLastImage = pObj->m_pImage; | 712 m_pLastImage = pObj->m_pImage; |
| 713 if (!m_pObjectList->m_bHasImageMask) |
| 714 m_pObjectList->m_bHasImageMask = m_pLastImage->IsMask(); |
713 } else if (type == "Form") { | 715 } else if (type == "Form") { |
714 AddForm(pXObject); | 716 AddForm(pXObject); |
715 } else { | 717 } else { |
716 return; | 718 return; |
717 } | 719 } |
718 } | 720 } |
719 void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) { | 721 void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) { |
720 if (!m_Options.m_bSeparateForm) { | 722 if (!m_Options.m_bSeparateForm) { |
721 CPDF_Dictionary* pResources = pStream->GetDict()->GetDict("Resources"); | 723 CPDF_Dictionary* pResources = pStream->GetDict()->GetDict("Resources"); |
722 CFX_Matrix form_matrix = pStream->GetDict()->GetMatrix("Matrix"); | 724 CFX_Matrix form_matrix = pStream->GetDict()->GetMatrix("Matrix"); |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 m_pObjectList->m_ObjectList.AddTail(pPathObj); | 1520 m_pObjectList->m_ObjectList.AddTail(pPathObj); |
1519 } | 1521 } |
1520 if (PathClipType) { | 1522 if (PathClipType) { |
1521 if (!matrix.IsIdentity()) { | 1523 if (!matrix.IsIdentity()) { |
1522 Path.Transform(&matrix); | 1524 Path.Transform(&matrix); |
1523 matrix.SetIdentity(); | 1525 matrix.SetIdentity(); |
1524 } | 1526 } |
1525 m_pCurStates->m_ClipPath.AppendPath(Path, PathClipType, TRUE); | 1527 m_pCurStates->m_ClipPath.AppendPath(Path, PathClipType, TRUE); |
1526 } | 1528 } |
1527 } | 1529 } |
OLD | NEW |