Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cpdf_renderoptions.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_FPDFAPI_RENDER_CPDF_RENDEROPTIONS_H_
8
#
define
CORE_FPDFAPI_RENDER_CPDF_RENDEROPTIONS_H_
9
10
#
include
<
stdint
.
h
>
11
12
#
include
"core/fpdfapi/page/cpdf_occontext.h"
13
#
include
"core/fpdfapi/page/cpdf_pageobject.h"
14
#
include
"core/fxcrt/retain_ptr.h"
15
#
include
"core/fxge/dib/fx_dib.h"
16
17
class
CPDF_Dictionary
;
18
19
class
CPDF_RenderOptions
{
20
public
:
21
enum
Type
:
uint8_t
{
kNormal
= 0,
kGray
,
kAlpha
,
kForcedColor
};
22
23
struct
Options
{
24
Options
();
25
Options
(
const
Options
& rhs);
26
Options
&
operator
=(
const
Options
& rhs);
27
28
bool
bClearType
=
false
;
29
bool
bNoNativeText
=
false
;
30
bool
bForceHalftone
=
false
;
31
bool
bRectAA
=
false
;
32
bool
bBreakForMasks
=
false
;
33
bool
bNoTextSmooth
=
false
;
34
bool
bNoPathSmooth
=
false
;
35
bool
bNoImageSmooth
=
false
;
36
bool
bLimitedImageCache
=
false
;
37
bool
bConvertFillToStroke
=
false
;
38
};
39
40
struct
ColorScheme
{
41
FX_ARGB
path_fill_color
;
42
FX_ARGB
path_stroke_color
;
43
FX_ARGB
text_fill_color
;
44
FX_ARGB
text_stroke_color
;
45
};
46
47
CPDF_RenderOptions
();
48
CPDF_RenderOptions
(
const
CPDF_RenderOptions
& rhs);
49
~
CPDF_RenderOptions
();
50
51
FX_ARGB
TranslateColor
(
FX_ARGB
argb)
const
;
52
FX_ARGB
TranslateObjectFillColor
(
FX_ARGB
argb,
53
CPDF_PageObject
::
Type
object_type)
const
;
54
FX_ARGB
TranslateObjectStrokeColor
(
FX_ARGB
argb,
55
CPDF_PageObject
::
Type
object_type)
const
;
56
57
void
SetColorScheme
(
const
ColorScheme
& color_scheme) {
58
m_ColorScheme = color_scheme;
59
}
60
61
void
SetColorMode
(
Type
mode) { m_ColorMode = mode; }
62
bool
ColorModeIs
(
Type
mode)
const
{
return
m_ColorMode == mode; }
63
64
const
Options
&
GetOptions
()
const
{
return
m_Options; }
65
Options
&
GetOptions
() {
return
m_Options; }
66
67
uint32_t
GetCacheSizeLimit
()
const
;
68
bool
CheckOCGDictVisible
(
const
CPDF_Dictionary
* pOC)
const
;
69
bool
CheckPageObjectVisible
(
const
CPDF_PageObject
* pPageObj)
const
;
70
71
void
SetDrawAnnots
(
bool
draw) { m_bDrawAnnots = draw; }
72
bool
GetDrawAnnots
()
const
{
return
m_bDrawAnnots; }
73
74
void
SetOCContext
(
RetainPtr
<CPDF_OCContext> context) {
75
m_pOCContext = context;
76
}
77
78
private
:
79
Type
m_ColorMode =
kNormal
;
80
bool
m_bDrawAnnots =
false
;
81
Options
m_Options;
82
ColorScheme
m_ColorScheme = {};
83
RetainPtr
<CPDF_OCContext> m_pOCContext;
84
};
85
86
#
endif
// CORE_FPDFAPI_RENDER_CPDF_RENDEROPTIONS_H_
CFX_FloatRect
Definition
fx_coordinates.h:185
CFX_FloatRect::CFX_FloatRect
CFX_FloatRect(const FX_RECT &rect)
Definition
fx_coordinates.cpp:130
CFX_FloatRect::GetOuterRect
FX_RECT GetOuterRect() const
Definition
fx_coordinates.cpp:183
CFX_Matrix
Definition
fx_coordinates.h:440
CFX_Matrix::TransformRect
CFX_FloatRect TransformRect(const CFX_FloatRect &rect) const
Definition
fx_coordinates.cpp:475
CFX_Matrix::d
float d
Definition
fx_coordinates.h:510
CFX_Matrix::a
float a
Definition
fx_coordinates.h:507
CFX_Matrix::Translate
void Translate(int32_t x, int32_t y)
Definition
fx_coordinates.h:483
CFX_Matrix::Scale
void Scale(float sx, float sy)
Definition
fx_coordinates.cpp:406
CFX_RenderDevice
Definition
cfx_renderdevice.h:39
CFX_RenderDevice::GetDeviceCaps
int GetDeviceCaps(int id) const
Definition
cfx_renderdevice.cpp:533
CPDF_DeviceBuffer
Definition
cpdf_devicebuffer.h:20
CPDF_DeviceBuffer::CPDF_DeviceBuffer
CPDF_DeviceBuffer(CPDF_RenderContext *pContext, CFX_RenderDevice *pDevice, const FX_RECT &rect, const CPDF_PageObject *pObj, int max_dpi)
Definition
cpdf_devicebuffer.cpp:60
CPDF_DeviceBuffer::~CPDF_DeviceBuffer
~CPDF_DeviceBuffer()
CPDF_DeviceBuffer::GetMatrix
const CFX_Matrix & GetMatrix() const
Definition
cpdf_devicebuffer.h:38
CPDF_DeviceBuffer::CalculateMatrix
static CFX_Matrix CalculateMatrix(CFX_RenderDevice *pDevice, const FX_RECT &rect, int max_dpi, bool scale)
Definition
cpdf_devicebuffer.cpp:37
CPDF_DeviceBuffer::OutputToDevice
void OutputToDevice()
Definition
cpdf_devicebuffer.cpp:89
CPDF_DeviceBuffer::Initialize
RetainPtr< CFX_DIBitmap > Initialize()
Definition
cpdf_devicebuffer.cpp:77
CPDF_Dictionary::DictMap
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
Definition
cpdf_dictionary.h:31
CPDF_PageObject
Definition
cpdf_pageobject.h:27
CPDF_PageObject::Type
Type
Definition
cpdf_pageobject.h:30
CPDF_RenderContext
Definition
cpdf_rendercontext.h:27
CPDF_RenderOptions
Definition
cpdf_renderoptions.h:19
CPDF_RenderOptions::~CPDF_RenderOptions
~CPDF_RenderOptions()
CPDF_RenderOptions::TranslateColor
FX_ARGB TranslateColor(FX_ARGB argb) const
Definition
cpdf_renderoptions.cpp:33
CPDF_RenderOptions::GetCacheSizeLimit
uint32_t GetCacheSizeLimit() const
Definition
cpdf_renderoptions.cpp:76
CPDF_RenderOptions::GetOptions
const Options & GetOptions() const
Definition
cpdf_renderoptions.h:64
CPDF_RenderOptions::CheckPageObjectVisible
bool CheckPageObjectVisible(const CPDF_PageObject *pPageObj) const
Definition
cpdf_renderoptions.cpp:84
CPDF_RenderOptions::CheckOCGDictVisible
bool CheckOCGDictVisible(const CPDF_Dictionary *pOC) const
Definition
cpdf_renderoptions.cpp:80
CPDF_RenderOptions::SetColorScheme
void SetColorScheme(const ColorScheme &color_scheme)
Definition
cpdf_renderoptions.h:57
CPDF_RenderOptions::CPDF_RenderOptions
CPDF_RenderOptions(const CPDF_RenderOptions &rhs)
CPDF_RenderOptions::TranslateObjectStrokeColor
FX_ARGB TranslateObjectStrokeColor(FX_ARGB argb, CPDF_PageObject::Type object_type) const
Definition
cpdf_renderoptions.cpp:60
CPDF_RenderOptions::SetOCContext
void SetOCContext(RetainPtr< CPDF_OCContext > context)
Definition
cpdf_renderoptions.h:74
CPDF_RenderOptions::ColorModeIs
bool ColorModeIs(Type mode) const
Definition
cpdf_renderoptions.h:62
CPDF_RenderOptions::Type
Type
Definition
cpdf_renderoptions.h:21
CPDF_RenderOptions::kForcedColor
@ kForcedColor
Definition
cpdf_renderoptions.h:21
CPDF_RenderOptions::kAlpha
@ kAlpha
Definition
cpdf_renderoptions.h:21
CPDF_RenderOptions::kGray
@ kGray
Definition
cpdf_renderoptions.h:21
CPDF_RenderOptions::kNormal
@ kNormal
Definition
cpdf_renderoptions.h:21
CPDF_RenderOptions::SetDrawAnnots
void SetDrawAnnots(bool draw)
Definition
cpdf_renderoptions.h:71
CPDF_RenderOptions::GetDrawAnnots
bool GetDrawAnnots() const
Definition
cpdf_renderoptions.h:72
CPDF_RenderOptions::GetOptions
Options & GetOptions()
Definition
cpdf_renderoptions.h:65
CPDF_RenderOptions::TranslateObjectFillColor
FX_ARGB TranslateObjectFillColor(FX_ARGB argb, CPDF_PageObject::Type object_type) const
Definition
cpdf_renderoptions.cpp:44
CPDF_RenderOptions::SetColorMode
void SetColorMode(Type mode)
Definition
cpdf_renderoptions.h:61
CPDF_RenderOptions::CPDF_RenderOptions
CPDF_RenderOptions()
Definition
cpdf_renderoptions.cpp:23
fxcrt::RetainPtr
Definition
retain_ptr.h:28
fxcrt::UnownedPtr
Definition
unowned_ptr.h:76
FX_ARGB
uint32_t FX_ARGB
Definition
fx_dib.h:36
NOTREACHED_NORETURN
#define NOTREACHED_NORETURN()
Definition
notreached.h:22
FXDC_RENDER_CAPS
#define FXDC_RENDER_CAPS
Definition
render_defines.h:15
FXDC_PIXEL_WIDTH
#define FXDC_PIXEL_WIDTH
Definition
render_defines.h:10
FXDC_VERT_SIZE
#define FXDC_VERT_SIZE
Definition
render_defines.h:14
FXDC_PIXEL_HEIGHT
#define FXDC_PIXEL_HEIGHT
Definition
render_defines.h:11
FXDC_HORZ_SIZE
#define FXDC_HORZ_SIZE
Definition
render_defines.h:13
FXRC_GET_BITS
#define FXRC_GET_BITS
Definition
render_defines.h:17
CPDF_RenderOptions::ColorScheme
Definition
cpdf_renderoptions.h:40
CPDF_RenderOptions::ColorScheme::path_stroke_color
FX_ARGB path_stroke_color
Definition
cpdf_renderoptions.h:42
CPDF_RenderOptions::ColorScheme::text_stroke_color
FX_ARGB text_stroke_color
Definition
cpdf_renderoptions.h:44
CPDF_RenderOptions::ColorScheme::text_fill_color
FX_ARGB text_fill_color
Definition
cpdf_renderoptions.h:43
CPDF_RenderOptions::ColorScheme::path_fill_color
FX_ARGB path_fill_color
Definition
cpdf_renderoptions.h:41
CPDF_RenderOptions::Options
Definition
cpdf_renderoptions.h:23
CPDF_RenderOptions::Options::bBreakForMasks
bool bBreakForMasks
Definition
cpdf_renderoptions.h:32
CPDF_RenderOptions::Options::Options
Options(const Options &rhs)
CPDF_RenderOptions::Options::bNoTextSmooth
bool bNoTextSmooth
Definition
cpdf_renderoptions.h:33
CPDF_RenderOptions::Options::bClearType
bool bClearType
Definition
cpdf_renderoptions.h:28
CPDF_RenderOptions::Options::Options
Options()
CPDF_RenderOptions::Options::operator=
Options & operator=(const Options &rhs)
CPDF_RenderOptions::Options::bRectAA
bool bRectAA
Definition
cpdf_renderoptions.h:31
CPDF_RenderOptions::Options::bForceHalftone
bool bForceHalftone
Definition
cpdf_renderoptions.h:30
CPDF_RenderOptions::Options::bNoNativeText
bool bNoNativeText
Definition
cpdf_renderoptions.h:29
CPDF_RenderOptions::Options::bLimitedImageCache
bool bLimitedImageCache
Definition
cpdf_renderoptions.h:36
CPDF_RenderOptions::Options::bNoImageSmooth
bool bNoImageSmooth
Definition
cpdf_renderoptions.h:35
CPDF_RenderOptions::Options::bConvertFillToStroke
bool bConvertFillToStroke
Definition
cpdf_renderoptions.h:37
CPDF_RenderOptions::Options::bNoPathSmooth
bool bNoPathSmooth
Definition
cpdf_renderoptions.h:34
FX_RECT
Definition
fx_coordinates.h:144
FX_RECT::FX_RECT
FX_RECT(const FX_RECT &that)=default
FX_RECT::top
int32_t top
Definition
fx_coordinates.h:179
FX_RECT::left
int32_t left
Definition
fx_coordinates.h:178
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
render
cpdf_renderoptions.h
Generated on
for Qt by
1.18.0