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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, | 104 void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, |
105 CFX_RenderDevice* pDevice, | 105 CFX_RenderDevice* pDevice, |
106 CPDF_RenderContext* pContext, | 106 CPDF_RenderContext* pContext, |
107 FX_BOOL bPrinting, | 107 FX_BOOL bPrinting, |
108 CFX_Matrix* pMatrix, | 108 CFX_Matrix* pMatrix, |
109 FX_BOOL bWidgetPass, | 109 FX_BOOL bWidgetPass, |
110 CPDF_RenderOptions* pOptions, | 110 CPDF_RenderOptions* pOptions, |
111 FX_RECT* clip_rect) { | 111 FX_RECT* clip_rect) { |
112 for (const auto& pAnnot : m_AnnotList) { | 112 for (const auto& pAnnot : m_AnnotList) { |
113 bool bWidget = pAnnot->GetSubtype() == "Widget"; | 113 bool bWidget = pAnnot->GetSubtype() == CPDF_Annot::Subtype::WIDGET; |
114 if ((bWidgetPass && !bWidget) || (!bWidgetPass && bWidget)) | 114 if ((bWidgetPass && !bWidget) || (!bWidgetPass && bWidget)) |
115 continue; | 115 continue; |
116 | 116 |
117 uint32_t annot_flags = pAnnot->GetFlags(); | 117 uint32_t annot_flags = pAnnot->GetFlags(); |
118 if (annot_flags & ANNOTFLAG_HIDDEN) | 118 if (annot_flags & ANNOTFLAG_HIDDEN) |
119 continue; | 119 continue; |
120 | 120 |
121 if (bPrinting && (annot_flags & ANNOTFLAG_PRINT) == 0) | 121 if (bPrinting && (annot_flags & ANNOTFLAG_PRINT) == 0) |
122 continue; | 122 continue; |
123 | 123 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 CPDF_RenderContext* pContext, | 173 CPDF_RenderContext* pContext, |
174 FX_BOOL bPrinting, | 174 FX_BOOL bPrinting, |
175 CFX_Matrix* pMatrix, | 175 CFX_Matrix* pMatrix, |
176 FX_BOOL bShowWidget, | 176 FX_BOOL bShowWidget, |
177 CPDF_RenderOptions* pOptions) { | 177 CPDF_RenderOptions* pOptions) { |
178 uint32_t dwAnnotFlags = bShowWidget ? ANNOTFLAG_INVISIBLE | ANNOTFLAG_HIDDEN | 178 uint32_t dwAnnotFlags = bShowWidget ? ANNOTFLAG_INVISIBLE | ANNOTFLAG_HIDDEN |
179 : ANNOTFLAG_INVISIBLE; | 179 : ANNOTFLAG_INVISIBLE; |
180 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, dwAnnotFlags, | 180 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, dwAnnotFlags, |
181 pOptions, nullptr); | 181 pOptions, nullptr); |
182 } | 182 } |
OLD | NEW |