| 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 "fpdfsdk/include/cpdfsdk_baannot.h" | 7 #include "fpdfsdk/include/cpdfsdk_baannot.h" |
| 8 | 8 |
| 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_number.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 } | 28 } |
| 29 | 29 |
| 30 void CPDFSDK_BAAnnot::SetRect(const CFX_FloatRect& rect) { | 30 void CPDFSDK_BAAnnot::SetRect(const CFX_FloatRect& rect) { |
| 31 ASSERT(rect.right - rect.left >= GetMinWidth()); | 31 ASSERT(rect.right - rect.left >= GetMinWidth()); |
| 32 ASSERT(rect.top - rect.bottom >= GetMinHeight()); | 32 ASSERT(rect.top - rect.bottom >= GetMinHeight()); |
| 33 | 33 |
| 34 m_pAnnot->GetAnnotDict()->SetAtRect("Rect", rect); | 34 m_pAnnot->GetAnnotDict()->SetAtRect("Rect", rect); |
| 35 } | 35 } |
| 36 | 36 |
| 37 CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const { | 37 CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const { |
| 38 CFX_FloatRect rect; | 38 return m_pAnnot->GetRect(); |
| 39 m_pAnnot->GetRect(rect); | |
| 40 return rect; | |
| 41 } | 39 } |
| 42 | 40 |
| 43 CFX_ByteString CPDFSDK_BAAnnot::GetType() const { | 41 CFX_ByteString CPDFSDK_BAAnnot::GetType() const { |
| 44 return m_pAnnot->GetSubType(); | 42 return m_pAnnot->GetSubType(); |
| 45 } | 43 } |
| 46 | 44 |
| 47 CFX_ByteString CPDFSDK_BAAnnot::GetSubType() const { | 45 CFX_ByteString CPDFSDK_BAAnnot::GetSubType() const { |
| 48 return ""; | 46 return ""; |
| 49 } | 47 } |
| 50 | 48 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 return CPDF_Action(); | 393 return CPDF_Action(); |
| 396 } | 394 } |
| 397 | 395 |
| 398 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, | 396 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, |
| 399 CFX_Matrix* pUser2Device, | 397 CFX_Matrix* pUser2Device, |
| 400 CPDF_RenderOptions* pOptions) { | 398 CPDF_RenderOptions* pOptions) { |
| 401 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); | 399 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); |
| 402 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, | 400 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, |
| 403 CPDF_Annot::Normal, nullptr); | 401 CPDF_Annot::Normal, nullptr); |
| 404 } | 402 } |
| OLD | NEW |