1 // Copyright 2016 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FPDFDOC_CPDF_ICONFIT_H_ 8 #define CORE_FPDFDOC_CPDF_ICONFIT_H_ 9 10 #include "core/fxcrt/fx_coordinates.h" 11 #include "core/fxcrt/fx_system.h" 12 #include "core/fxcrt/retain_ptr.h" 13 14 class CPDF_Dictionary; 15 16 class CPDF_IconFit { 17 public: 18 enum ScaleMethod { Always = 0, Bigger, Smaller, Never }; 19 20 explicit CPDF_IconFit(const CPDF_Dictionary* pDict); 21 CPDF_IconFit(const CPDF_IconFit& that); 22 ~CPDF_IconFit(); 23 24 ScaleMethod GetScaleMethod() const; 25 bool IsProportionalScale() const; 26 bool GetFittingBounds() const; 27 CFX_PointF GetIconBottomLeftPosition() const; 28 CFX_PointF GetIconPosition() const; 29 30 private: 31 RetainPtr<const CPDF_Dictionary> const m_pDict; 32 }; 33 34 #endif // CORE_FPDFDOC_CPDF_ICONFIT_H_ 35