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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp

Issue 2283113002: Add -> operators to CFX_CountRef. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@privatize
Patch Set: Regenerate patch, rebase off of master. Created 4 years, 3 months 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
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_pathobject.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_textobject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/fpdf_page/include/cpdf_shadingobject.h" 7 #include "core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h"
8 8
9 #include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h" 9 #include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h"
10 #include "core/fpdfapi/fpdf_page/pageint.h" 10 #include "core/fpdfapi/fpdf_page/pageint.h"
(...skipping 18 matching lines...) Expand all
29 obj->m_Matrix = m_Matrix; 29 obj->m_Matrix = m_Matrix;
30 return obj; 30 return obj;
31 } 31 }
32 32
33 CPDF_PageObject::Type CPDF_ShadingObject::GetType() const { 33 CPDF_PageObject::Type CPDF_ShadingObject::GetType() const {
34 return SHADING; 34 return SHADING;
35 } 35 }
36 36
37 void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) { 37 void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) {
38 if (m_ClipPath) { 38 if (m_ClipPath) {
39 m_ClipPath.GetPrivateCopy(); 39 m_ClipPath.MakePrivateCopy();
40 m_ClipPath.Transform(matrix); 40 m_ClipPath.Transform(matrix);
41 } 41 }
42 m_Matrix.Concat(matrix); 42 m_Matrix.Concat(matrix);
43 if (m_ClipPath) { 43 if (m_ClipPath) {
44 CalcBoundingBox(); 44 CalcBoundingBox();
45 } else { 45 } else {
46 matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom); 46 matrix.TransformRect(m_Left, m_Right, m_Top, m_Bottom);
47 } 47 }
48 } 48 }
49 49
(...skipping 11 matching lines...) Expand all
61 61
62 void CPDF_ShadingObject::CalcBoundingBox() { 62 void CPDF_ShadingObject::CalcBoundingBox() {
63 if (!m_ClipPath) 63 if (!m_ClipPath)
64 return; 64 return;
65 CFX_FloatRect rect = m_ClipPath.GetClipBox(); 65 CFX_FloatRect rect = m_ClipPath.GetClipBox();
66 m_Left = rect.left; 66 m_Left = rect.left;
67 m_Bottom = rect.bottom; 67 m_Bottom = rect.bottom;
68 m_Right = rect.right; 68 m_Right = rect.right;
69 m_Top = rect.top; 69 m_Top = rect.top;
70 } 70 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_pathobject.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_textobject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698