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_apsettings.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_APSETTINGS_H_
8#define CORE_FPDFDOC_CPDF_APSETTINGS_H_
9
10#include "core/fpdfdoc/cpdf_iconfit.h"
11#include "core/fxcrt/fx_string.h"
12#include "core/fxcrt/retain_ptr.h"
13#include "core/fxge/cfx_color.h"
14#include "core/fxge/dib/fx_dib.h"
15
16class CPDF_Dictionary;
17class CPDF_Stream;
18
19// Corresponds to PDF spec section 12.5.6.19 (Widget annotation TP dictionary).
20#define TEXTPOS_CAPTION 0
21#define TEXTPOS_ICON 1
22#define TEXTPOS_BELOW 2
23#define TEXTPOS_ABOVE 3
24#define TEXTPOS_RIGHT 4
25#define TEXTPOS_LEFT 5
26#define TEXTPOS_OVERLAID 6
27
29 public:
30 explicit CPDF_ApSettings(RetainPtr<CPDF_Dictionary> pDict);
33
34 bool HasMKEntry(const ByteString& csEntry) const;
35 int GetRotation() const;
36
38
39 // Returns one of the TEXTPOS_* values above.
40 int GetTextPosition() const;
41
42 CFX_Color::TypeAndARGB GetColorARGB(const ByteString& csEntry) const;
43
44 float GetOriginalColorComponent(int index, const ByteString& csEntry) const;
45 CFX_Color GetOriginalColor(const ByteString& csEntry) const;
46
47 WideString GetCaption(const ByteString& csEntry) const;
48 RetainPtr<CPDF_Stream> GetIcon(const ByteString& csEntry) const;
49
50 private:
51 RetainPtr<CPDF_Dictionary> const m_pDict;
52};
53
54#endif // CORE_FPDFDOC_CPDF_APSETTINGS_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
#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