OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/page/cpdf_streamcontentparser.h" | 7 #include "core/fpdfapi/page/cpdf_streamcontentparser.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 return AddImageObject(std::move(pImageObj)); | 841 return AddImageObject(std::move(pImageObj)); |
842 } | 842 } |
843 | 843 |
844 CPDF_ImageObject* CPDF_StreamContentParser::AddImageObject( | 844 CPDF_ImageObject* CPDF_StreamContentParser::AddImageObject( |
845 std::unique_ptr<CPDF_ImageObject> pImageObj) { | 845 std::unique_ptr<CPDF_ImageObject> pImageObj) { |
846 SetGraphicStates(pImageObj.get(), pImageObj->GetImage()->IsMask(), false, | 846 SetGraphicStates(pImageObj.get(), pImageObj->GetImage()->IsMask(), false, |
847 false); | 847 false); |
848 | 848 |
849 CFX_Matrix ImageMatrix = m_pCurStates->m_CTM; | 849 CFX_Matrix ImageMatrix = m_pCurStates->m_CTM; |
850 ImageMatrix.Concat(m_mtContentToUser); | 850 ImageMatrix.Concat(m_mtContentToUser); |
851 pImageObj->m_Matrix = ImageMatrix; | 851 pImageObj->set_matrix(ImageMatrix); |
852 pImageObj->CalcBoundingBox(); | 852 pImageObj->CalcBoundingBox(); |
853 | 853 |
854 CPDF_ImageObject* pRet = pImageObj.get(); | 854 CPDF_ImageObject* pRet = pImageObj.get(); |
855 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pImageObj)); | 855 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pImageObj)); |
856 return pRet; | 856 return pRet; |
857 } | 857 } |
858 | 858 |
859 void CPDF_StreamContentParser::Handle_MarkPlace_Dictionary() {} | 859 void CPDF_StreamContentParser::Handle_MarkPlace_Dictionary() {} |
860 | 860 |
861 void CPDF_StreamContentParser::Handle_EndImage() {} | 861 void CPDF_StreamContentParser::Handle_EndImage() {} |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 } | 1661 } |
1662 default: | 1662 default: |
1663 bProcessed = false; | 1663 bProcessed = false; |
1664 } | 1664 } |
1665 if (!bProcessed) { | 1665 if (!bProcessed) { |
1666 m_pSyntax->SetPos(last_pos); | 1666 m_pSyntax->SetPos(last_pos); |
1667 return; | 1667 return; |
1668 } | 1668 } |
1669 } | 1669 } |
1670 } | 1670 } |
OLD | NEW |