| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_form.h" | 7 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" |
| 8 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 8 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
| 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 if (!psub) | 172 if (!psub) |
| 173 return nullptr; | 173 return nullptr; |
| 174 if (CPDF_Stream* pStream = psub->AsStream()) | 174 if (CPDF_Stream* pStream = psub->AsStream()) |
| 175 return pStream; | 175 return pStream; |
| 176 | 176 |
| 177 if (CPDF_Dictionary* pDict = psub->AsDictionary()) { | 177 if (CPDF_Dictionary* pDict = psub->AsDictionary()) { |
| 178 CFX_ByteString as = pAnnotDict->GetStringBy("AS"); | 178 CFX_ByteString as = pAnnotDict->GetStringBy("AS"); |
| 179 if (as.IsEmpty()) { | 179 if (as.IsEmpty()) { |
| 180 CFX_ByteString value = pAnnotDict->GetStringBy("V"); | 180 CFX_ByteString value = pAnnotDict->GetStringBy("V"); |
| 181 if (value.IsEmpty()) { | 181 if (value.IsEmpty()) { |
| 182 CPDF_Dictionary* pDict = pAnnotDict->GetDictBy("Parent"); | 182 CPDF_Dictionary* pParentDict = pAnnotDict->GetDictBy("Parent"); |
| 183 value = pDict ? pDict->GetStringBy("V") : CFX_ByteString(); | 183 value = pParentDict ? pParentDict->GetStringBy("V") : CFX_ByteString(); |
| 184 } | 184 } |
| 185 if (value.IsEmpty() || !pDict->KeyExist(value)) | 185 if (value.IsEmpty() || !pDict->KeyExist(value)) |
| 186 as = "Off"; | 186 as = "Off"; |
| 187 else | 187 else |
| 188 as = value; | 188 as = value; |
| 189 } | 189 } |
| 190 return pDict->GetStreamBy(as); | 190 return pDict->GetStreamBy(as); |
| 191 } | 191 } |
| 192 return nullptr; | 192 return nullptr; |
| 193 } | 193 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 CFX_PathData path; | 348 CFX_PathData path; |
| 349 width /= 2; | 349 width /= 2; |
| 350 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, | 350 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, |
| 351 rect.top - width); | 351 rect.top - width); |
| 352 int fill_type = 0; | 352 int fill_type = 0; |
| 353 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { | 353 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { |
| 354 fill_type |= FXFILL_NOPATHSMOOTH; | 354 fill_type |= FXFILL_NOPATHSMOOTH; |
| 355 } | 355 } |
| 356 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); | 356 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); |
| 357 } | 357 } |
| OLD | NEW |