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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |