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

Side by Side Diff: core/fpdfdoc/cpdf_annotlist.cpp

Issue 2278153005: CPDF_Annot::GetRect() should return CFX_FloatRect. (Closed)
Patch Set: 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/fpdfdoc/cpdf_annot.cpp ('k') | core/fpdfdoc/include/cpdf_annot.h » ('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/fpdfdoc/include/cpdf_annotlist.h" 7 #include "core/fpdfdoc/include/cpdf_annotlist.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 continue; 77 continue;
78 78
79 if (pOptions) { 79 if (pOptions) {
80 CPDF_OCContext* pOCContext = pOptions->m_pOCContext; 80 CPDF_OCContext* pOCContext = pOptions->m_pOCContext;
81 CPDF_Dictionary* pAnnotDict = pAnnot->GetAnnotDict(); 81 CPDF_Dictionary* pAnnotDict = pAnnot->GetAnnotDict();
82 if (pOCContext && pAnnotDict && 82 if (pOCContext && pAnnotDict &&
83 !pOCContext->CheckOCGVisible(pAnnotDict->GetDictBy("OC"))) { 83 !pOCContext->CheckOCGVisible(pAnnotDict->GetDictBy("OC"))) {
84 continue; 84 continue;
85 } 85 }
86 } 86 }
87 CFX_FloatRect annot_rect_f; 87 CFX_FloatRect annot_rect_f = pAnnot->GetRect();
88 pAnnot->GetRect(annot_rect_f);
89 CFX_Matrix matrix = *pMatrix; 88 CFX_Matrix matrix = *pMatrix;
90 if (clip_rect) { 89 if (clip_rect) {
91 annot_rect_f.Transform(&matrix); 90 annot_rect_f.Transform(&matrix);
92 FX_RECT annot_rect = annot_rect_f.GetOuterRect(); 91 FX_RECT annot_rect = annot_rect_f.GetOuterRect();
93 annot_rect.Intersect(*clip_rect); 92 annot_rect.Intersect(*clip_rect);
94 if (annot_rect.IsEmpty()) { 93 if (annot_rect.IsEmpty()) {
95 continue; 94 continue;
96 } 95 }
97 } 96 }
98 if (pContext) { 97 if (pContext) {
(...skipping 27 matching lines...) Expand all
126 CPDF_RenderContext* pContext, 125 CPDF_RenderContext* pContext,
127 FX_BOOL bPrinting, 126 FX_BOOL bPrinting,
128 CFX_Matrix* pMatrix, 127 CFX_Matrix* pMatrix,
129 FX_BOOL bShowWidget, 128 FX_BOOL bShowWidget,
130 CPDF_RenderOptions* pOptions) { 129 CPDF_RenderOptions* pOptions) {
131 uint32_t dwAnnotFlags = bShowWidget ? ANNOTFLAG_INVISIBLE | ANNOTFLAG_HIDDEN 130 uint32_t dwAnnotFlags = bShowWidget ? ANNOTFLAG_INVISIBLE | ANNOTFLAG_HIDDEN
132 : ANNOTFLAG_INVISIBLE; 131 : ANNOTFLAG_INVISIBLE;
133 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, dwAnnotFlags, 132 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, dwAnnotFlags,
134 pOptions, nullptr); 133 pOptions, nullptr);
135 } 134 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpdf_annot.cpp ('k') | core/fpdfdoc/include/cpdf_annot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698