Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: fpdfsdk/src/fsdk_baseannot.cpp

Issue 1513363002: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/include/fxcrt/fx_ext.h" 7 #include "core/include/fxcrt/fx_ext.h"
8 #include "fpdfsdk/include/fsdk_baseannot.h" 8 #include "fpdfsdk/include/fsdk_baseannot.h"
9 #include "fpdfsdk/include/fsdk_define.h" 9 #include "fpdfsdk/include/fsdk_define.h"
10 #include "fpdfsdk/include/fsdk_mgr.h" 10 #include "fpdfsdk/include/fsdk_mgr.h"
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 ASSERT(m_pAnnot != NULL); 553 ASSERT(m_pAnnot != NULL);
554 554
555 return m_pAnnot->GetSubType(); 555 return m_pAnnot->GetSubType();
556 } 556 }
557 557
558 CFX_ByteString CPDFSDK_BAAnnot::GetSubType() const { 558 CFX_ByteString CPDFSDK_BAAnnot::GetSubType() const {
559 return ""; 559 return "";
560 } 560 }
561 561
562 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice, 562 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice,
563 const CPDF_Matrix* pUser2Device, 563 const CFX_Matrix* pUser2Device,
564 CPDF_Annot::AppearanceMode mode, 564 CPDF_Annot::AppearanceMode mode,
565 const CPDF_RenderOptions* pOptions) { 565 const CPDF_RenderOptions* pOptions) {
566 ASSERT(m_pPageView != NULL); 566 ASSERT(m_pPageView != NULL);
567 ASSERT(m_pAnnot != NULL); 567 ASSERT(m_pAnnot != NULL);
568 568
569 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, 569 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
570 mode, pOptions); 570 mode, pOptions);
571 } 571 }
572 572
573 FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid() { 573 FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid() {
(...skipping 16 matching lines...) Expand all
590 590
591 // Get the AP stream or subdirectory 591 // Get the AP stream or subdirectory
592 CPDF_Object* psub = pAP->GetElementValue(ap_entry); 592 CPDF_Object* psub = pAP->GetElementValue(ap_entry);
593 if (psub == NULL) 593 if (psub == NULL)
594 return FALSE; 594 return FALSE;
595 595
596 return TRUE; 596 return TRUE;
597 } 597 }
598 598
599 void CPDFSDK_BAAnnot::DrawBorder(CFX_RenderDevice* pDevice, 599 void CPDFSDK_BAAnnot::DrawBorder(CFX_RenderDevice* pDevice,
600 const CPDF_Matrix* pUser2Device, 600 const CFX_Matrix* pUser2Device,
601 const CPDF_RenderOptions* pOptions) { 601 const CPDF_RenderOptions* pOptions) {
602 ASSERT(m_pAnnot != NULL); 602 ASSERT(m_pAnnot != NULL);
603 m_pAnnot->DrawBorder(pDevice, pUser2Device, pOptions); 603 m_pAnnot->DrawBorder(pDevice, pUser2Device, pOptions);
604 } 604 }
605 605
606 void CPDFSDK_BAAnnot::ClearCachedAP() { 606 void CPDFSDK_BAAnnot::ClearCachedAP() {
607 ASSERT(m_pAnnot != NULL); 607 ASSERT(m_pAnnot != NULL);
608 m_pAnnot->ClearCachedAP(); 608 m_pAnnot->ClearCachedAP();
609 } 609 }
610 610
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 838
839 return TRUE; 839 return TRUE;
840 } 840 }
841 } 841 }
842 842
843 return FALSE; 843 return FALSE;
844 } 844 }
845 845
846 void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType, 846 void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
847 const CPDF_Rect& rcBBox, 847 const CPDF_Rect& rcBBox,
848 const CPDF_Matrix& matrix, 848 const CFX_Matrix& matrix,
849 const CFX_ByteString& sContents, 849 const CFX_ByteString& sContents,
850 const CFX_ByteString& sAPState) { 850 const CFX_ByteString& sAPState) {
851 CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP"); 851 CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP");
852 852
853 if (!pAPDict) { 853 if (!pAPDict) {
854 pAPDict = new CPDF_Dictionary; 854 pAPDict = new CPDF_Dictionary;
855 m_pAnnot->GetAnnotDict()->SetAt("AP", pAPDict); 855 m_pAnnot->GetAnnotDict()->SetAt("AP", pAPDict);
856 } 856 }
857 857
858 CPDF_Stream* pStream = nullptr; 858 CPDF_Stream* pStream = nullptr;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 if (AAction.ActionExist(eAAT)) 960 if (AAction.ActionExist(eAAT))
961 return AAction.GetAction(eAAT); 961 return AAction.GetAction(eAAT);
962 962
963 if (eAAT == CPDF_AAction::ButtonUp) 963 if (eAAT == CPDF_AAction::ButtonUp)
964 return GetAction(); 964 return GetAction();
965 965
966 return CPDF_Action(); 966 return CPDF_Action();
967 } 967 }
968 968
969 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, 969 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice,
970 CPDF_Matrix* pUser2Device, 970 CFX_Matrix* pUser2Device,
971 CPDF_RenderOptions* pOptions) { 971 CPDF_RenderOptions* pOptions) {
972 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); 972 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal);
973 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, 973 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
974 CPDF_Annot::Normal, NULL); 974 CPDF_Annot::Normal, NULL);
975 975
976 return; 976 return;
977 } 977 }
978 978
979 UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() { 979 UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() {
980 return GetPDFPage(); 980 return GetPDFPage();
981 } 981 }
982 982
983 CPDF_Page* CPDFSDK_Annot::GetPDFPage() { 983 CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
984 if (m_pPageView) 984 if (m_pPageView)
985 return m_pPageView->GetPDFPage(); 985 return m_pPageView->GetPDFPage();
986 return NULL; 986 return NULL;
987 } 987 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698