Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_iconfit.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
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/retain_ptr.h"
12
13class CPDF_Dictionary;
14
16 public:
17 enum class ScaleMethod { kAlways = 0, kBigger, kSmaller, kNever };
18
19 explicit CPDF_IconFit(RetainPtr<const CPDF_Dictionary> pDict);
22
24 bool IsProportionalScale() const;
25 bool GetFittingBounds() const;
26 CFX_PointF GetIconBottomLeftPosition() const;
27 CFX_VectorF GetScale(const CFX_SizeF& image_size,
28 const CFX_FloatRect& rcPlate) const;
29 CFX_VectorF GetImageOffset(const CFX_SizeF& image_size,
30 const CFX_VectorF& scale,
31 const CFX_FloatRect& rcPlate) const;
32
33 private:
34 CFX_PointF GetIconPosition() const;
35
36 RetainPtr<const CPDF_Dictionary> const m_pDict;
37};
38
39#endif // CORE_FPDFDOC_CPDF_ICONFIT_H_
CFX_Color GetOriginalColor(const ByteString &csEntry) const
bool HasMKEntry(const ByteString &csEntry) const
int GetRotation() const
RetainPtr< CPDF_Stream > GetIcon(const ByteString &csEntry) const
CPDF_ApSettings(const CPDF_ApSettings &that)
CPDF_IconFit GetIconFit() const
WideString GetCaption(const ByteString &csEntry) const
float GetOriginalColorComponent(int index, const ByteString &csEntry) const
CFX_Color::TypeAndARGB GetColorARGB(const ByteString &csEntry) const
CPDF_ApSettings(RetainPtr< CPDF_Dictionary > pDict)
int GetTextPosition() const
ScaleMethod GetScaleMethod() const
bool GetFittingBounds() const
CFX_VectorF GetImageOffset(const CFX_SizeF &image_size, const CFX_VectorF &scale, const CFX_FloatRect &rcPlate) const
CFX_PointF GetIconBottomLeftPosition() const
bool IsProportionalScale() const
CFX_VectorF GetScale(const CFX_SizeF &image_size, const CFX_FloatRect &rcPlate) const
CPDF_IconFit(RetainPtr< const CPDF_Dictionary > pDict)
CPDF_IconFit(const CPDF_IconFit &that)
#define TEXTPOS_CAPTION
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:118
TypeAndARGB(CFX_Color::Type type_in, FX_ARGB argb_in)
Definition cfx_color.h:17
constexpr CFX_Color(Type type=CFX_Color::Type::kTransparent, float color1=0.0f, float color2=0.0f, float color3=0.0f, float color4=0.0f)
Definition cfx_color.h:27