Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp

Issue 1513363002: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_page.h" 9 #include "core/include/fpdfapi/fpdf_page.h"
10 #include "core/include/fpdfapi/fpdf_pageobj.h" 10 #include "core/include/fpdfapi/fpdf_pageobj.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 } 26 }
27 void CPDF_ImageObject::CopyData(const CPDF_PageObject* pSrc) { 27 void CPDF_ImageObject::CopyData(const CPDF_PageObject* pSrc) {
28 const CPDF_ImageObject* pSrcObj = (const CPDF_ImageObject*)pSrc; 28 const CPDF_ImageObject* pSrcObj = (const CPDF_ImageObject*)pSrc;
29 if (m_pImage) { 29 if (m_pImage) {
30 m_pImage->Release(); 30 m_pImage->Release();
31 } 31 }
32 m_pImage = pSrcObj->m_pImage->Clone(); 32 m_pImage = pSrcObj->m_pImage->Clone();
33 m_Matrix = pSrcObj->m_Matrix; 33 m_Matrix = pSrcObj->m_Matrix;
34 } 34 }
35 void CPDF_ImageObject::Transform(const CFX_AffineMatrix& matrix) { 35 void CPDF_ImageObject::Transform(const CFX_Matrix& matrix) {
36 m_Matrix.Concat(matrix); 36 m_Matrix.Concat(matrix);
37 CalcBoundingBox(); 37 CalcBoundingBox();
38 } 38 }
39 void CPDF_ImageObject::CalcBoundingBox() { 39 void CPDF_ImageObject::CalcBoundingBox() {
40 m_Left = m_Bottom = 0; 40 m_Left = m_Bottom = 0;
41 m_Right = m_Top = 1.0f; 41 m_Right = m_Top = 1.0f;
42 m_Matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom); 42 m_Matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom);
43 } 43 }
44 void CPDF_Image::Release() { 44 void CPDF_Image::Release() {
45 if (m_bInline || (m_pStream && m_pStream->GetObjNum() == 0)) { 45 if (m_bInline || (m_pStream && m_pStream->GetObjNum() == 0)) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 m_pInlineDict = ToDictionary(pDict->Clone()); 89 m_pInlineDict = ToDictionary(pDict->Clone());
90 } 90 }
91 m_pOC = pDict->GetDict(FX_BSTRC("OC")); 91 m_pOC = pDict->GetDict(FX_BSTRC("OC"));
92 m_bIsMask = !pDict->KeyExist(FX_BSTRC("ColorSpace")) || 92 m_bIsMask = !pDict->KeyExist(FX_BSTRC("ColorSpace")) ||
93 pDict->GetInteger(FX_BSTRC("ImageMask")); 93 pDict->GetInteger(FX_BSTRC("ImageMask"));
94 m_bInterpolate = pDict->GetInteger(FX_BSTRC("Interpolate")); 94 m_bInterpolate = pDict->GetInteger(FX_BSTRC("Interpolate"));
95 m_Height = pDict->GetInteger(FX_BSTRC("Height")); 95 m_Height = pDict->GetInteger(FX_BSTRC("Height"));
96 m_Width = pDict->GetInteger(FX_BSTRC("Width")); 96 m_Width = pDict->GetInteger(FX_BSTRC("Width"));
97 return TRUE; 97 return TRUE;
98 } 98 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698