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
cfwl_carettp.cpp
Go to the documentation of this file.
1
// Copyright 2014 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
#
include
"xfa/fwl/theme/cfwl_carettp.h"
8
9
#
include
"xfa/fgas/graphics/cfgas_gecolor.h"
10
#
include
"xfa/fgas/graphics/cfgas_gegraphics.h"
11
#
include
"xfa/fgas/graphics/cfgas_gepath.h"
12
#
include
"xfa/fwl/cfwl_caret.h"
13
#
include
"xfa/fwl/cfwl_themebackground.h"
14
#
include
"xfa/fwl/cfwl_widget.h"
15
16
namespace
pdfium
{
17
18
CFWL_CaretTP::CFWL_CaretTP() =
default
;
19
20
CFWL_CaretTP::~
CFWL_CaretTP
() =
default
;
21
22
void
CFWL_CaretTP::
DrawBackground
(
const
CFWL_ThemeBackground& pParams) {
23
switch
(pParams
.
GetPart
()) {
24
case
CFWL_ThemePart
::
Part
::
kBackground
: {
25
if
(!(pParams.m_dwStates &
CFWL_PartState
::
kHightLight
))
26
return
;
27
28
DrawCaretBK(pParams
.
GetGraphics
(
)
, pParams.m_dwStates, pParams.m_PartRect,
29
pParams.m_matrix);
30
break
;
31
}
32
default
:
33
break
;
34
}
35
}
36
37
void
CFWL_CaretTP::DrawCaretBK(
CFGAS_GEGraphics
* pGraphics,
38
Mask
<
CFWL_PartState
> dwStates,
39
const
CFX_RectF
& rect,
40
const
CFX_Matrix
& matrix) {
41
CFGAS_GEPath path;
42
path
.
AddRectangle
(
rect
.
left
,
rect
.
top
,
rect
.
width
,
rect
.
height
)
;
43
pGraphics
->
SetFillColor
(
CFGAS_GEColor
(
ArgbEncode
(
255
,
0
,
0
,
0
)
)
)
;
44
pGraphics
->
FillPath
(
path
,
CFX_FillRenderOptions
::
FillType
::
kWinding
,
matrix
)
;
45
}
46
47
}
// namespace pdfium
CFGAS_GEColor
Definition
cfgas_gecolor.h:19
CFGAS_GEColor::CFGAS_GEColor
CFGAS_GEColor(FX_ARGB argb)
Definition
cfgas_gecolor.cpp:9
CFGAS_GEGraphics
Definition
cfgas_gegraphics.h:26
CFGAS_GEGraphics::FillPath
void FillPath(const CFGAS_GEPath &path, CFX_FillRenderOptions::FillType fill_type, const CFX_Matrix &matrix)
Definition
cfgas_gegraphics.cpp:178
CFGAS_GEGraphics::SetFillColor
void SetFillColor(const CFGAS_GEColor &color)
Definition
cfgas_gegraphics.cpp:169
CFGAS_GEPath::AddRectangle
void AddRectangle(float left, float top, float width, float height)
Definition
cfgas_gepath.cpp:83
CFX_Matrix
Definition
fx_coordinates.h:440
CFX_RectF
Definition
fx_coordinates.h:276
CFX_RectF::width
float width
Definition
fx_coordinates.h:430
CFX_RectF::left
float left
Definition
fx_coordinates.h:428
CFX_RectF::height
float height
Definition
fx_coordinates.h:431
CFX_RectF::top
float top
Definition
fx_coordinates.h:429
fxcrt::Mask
Definition
mask.h:15
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
pdfium::CFWL_CaretTP::DrawBackground
void DrawBackground(const CFWL_ThemeBackground &pParams) override
Definition
cfwl_carettp.cpp:22
pdfium::CFWL_CaretTP::~CFWL_CaretTP
~CFWL_CaretTP() override
pdfium::CFWL_ThemeBackground::GetGraphics
CFGAS_GEGraphics * GetGraphics() const
Definition
cfwl_themebackground.h:28
pdfium::CFWL_ThemePart
Definition
cfwl_themepart.h:39
pdfium::CFWL_ThemePart::GetPart
Part GetPart() const
Definition
cfwl_themepart.h:92
pdfium::CFWL_ThemePart::Part
Part
Definition
cfwl_themepart.h:41
pdfium::CFWL_ThemePart::Part::kBackground
@ kBackground
Definition
cfwl_themepart.h:45
ArgbEncode
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition
fx_dib.h:188
pdfium::CFWL_PartState
CFWL_PartState
Definition
cfwl_themepart.h:22
pdfium::CFWL_PartState::kHightLight
@ kHightLight
Definition
cfwl_themepart.h:29
CFX_FillRenderOptions
Definition
cfx_fillrenderoptions.h:11
CFX_FillRenderOptions::FillType
FillType
Definition
cfx_fillrenderoptions.h:13
CFX_FillRenderOptions::FillType::kWinding
@ kWinding
Definition
cfx_fillrenderoptions.h:23
qtwebengine
src
3rdparty
chromium
third_party
pdfium
xfa
fwl
theme
cfwl_carettp.cpp
Generated on
for Qt by
1.18.0