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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, | 56 void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, |
57 CFX_RenderDevice* pDevice, | 57 CFX_RenderDevice* pDevice, |
58 CPDF_RenderContext* pContext, | 58 CPDF_RenderContext* pContext, |
59 FX_BOOL bPrinting, | 59 FX_BOOL bPrinting, |
60 CFX_Matrix* pMatrix, | 60 CFX_Matrix* pMatrix, |
61 FX_BOOL bWidgetPass, | 61 FX_BOOL bWidgetPass, |
62 CPDF_RenderOptions* pOptions, | 62 CPDF_RenderOptions* pOptions, |
63 FX_RECT* clip_rect) { | 63 FX_RECT* clip_rect) { |
64 for (const auto& pAnnot : m_AnnotList) { | 64 for (const auto& pAnnot : m_AnnotList) { |
65 bool bWidget = pAnnot->GetSubType() == "Widget"; | 65 bool bWidget = pAnnot->GetSubtype() == "Widget"; |
66 if ((bWidgetPass && !bWidget) || (!bWidgetPass && bWidget)) | 66 if ((bWidgetPass && !bWidget) || (!bWidgetPass && bWidget)) |
67 continue; | 67 continue; |
68 | 68 |
69 uint32_t annot_flags = pAnnot->GetFlags(); | 69 uint32_t annot_flags = pAnnot->GetFlags(); |
70 if (annot_flags & ANNOTFLAG_HIDDEN) | 70 if (annot_flags & ANNOTFLAG_HIDDEN) |
71 continue; | 71 continue; |
72 | 72 |
73 if (bPrinting && (annot_flags & ANNOTFLAG_PRINT) == 0) | 73 if (bPrinting && (annot_flags & ANNOTFLAG_PRINT) == 0) |
74 continue; | 74 continue; |
75 | 75 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 CPDF_RenderContext* pContext, | 125 CPDF_RenderContext* pContext, |
126 FX_BOOL bPrinting, | 126 FX_BOOL bPrinting, |
127 CFX_Matrix* pMatrix, | 127 CFX_Matrix* pMatrix, |
128 FX_BOOL bShowWidget, | 128 FX_BOOL bShowWidget, |
129 CPDF_RenderOptions* pOptions) { | 129 CPDF_RenderOptions* pOptions) { |
130 uint32_t dwAnnotFlags = bShowWidget ? ANNOTFLAG_INVISIBLE | ANNOTFLAG_HIDDEN | 130 uint32_t dwAnnotFlags = bShowWidget ? ANNOTFLAG_INVISIBLE | ANNOTFLAG_HIDDEN |
131 : ANNOTFLAG_INVISIBLE; | 131 : ANNOTFLAG_INVISIBLE; |
132 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, dwAnnotFlags, | 132 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, dwAnnotFlags, |
133 pOptions, nullptr); | 133 pOptions, nullptr); |
134 } | 134 } |
OLD | NEW |