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
cfx_drawutils.cpp
Go to the documentation of this file.
1
// Copyright 2020 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
"core/fxge/cfx_drawutils.h"
8
9
#
include
"core/fxge/cfx_fillrenderoptions.h"
10
#
include
"core/fxge/cfx_graphstatedata.h"
11
#
include
"core/fxge/cfx_path.h"
12
#
include
"core/fxge/cfx_renderdevice.h"
13
#
include
"third_party/base/check.h"
14
15
// static
16
void
CFX_DrawUtils
::
DrawFocusRect
(
CFX_RenderDevice
* render_device,
17
const
CFX_Matrix
& user_to_device,
18
const
CFX_FloatRect
& view_bounding_box) {
19
DCHECK(render_device);
20
CFX_Path
path;
21
path
.
AppendPoint
(
CFX_PointF(view_bounding_box
.
left
, view_bounding_box
.
top
)
,
22
CFX_Path
::
Point
::
Type
::
kMove
)
;
23
path
.
AppendPoint
(
CFX_PointF(view_bounding_box
.
left
, view_bounding_box
.
bottom
)
,
24
CFX_Path
::
Point
::
Type
::
kLine
)
;
25
path
.
AppendPoint
(
26
CFX_PointF(view_bounding_box
.
right
, view_bounding_box
.
bottom
)
,
27
CFX_Path
::
Point
::
Type
::
kLine
)
;
28
path
.
AppendPoint
(
CFX_PointF(view_bounding_box
.
right
, view_bounding_box
.
top
)
,
29
CFX_Path
::
Point
::
Type
::
kLine
)
;
30
path
.
AppendPoint
(
CFX_PointF(view_bounding_box
.
left
, view_bounding_box
.
top
)
,
31
CFX_Path
::
Point
::
Type
::
kLine
)
;
32
33
CFX_GraphStateData
graph_state_data;
34
graph_state_data.m_DashArray = {1.0f};
35
graph_state_data
.
m_DashPhase
= 0;
36
graph_state_data
.
m_LineWidth
= 1.0f;
37
38
render_device
->
DrawPath
(
path
,
&user_to_device
,
&graph_state_data
,
0
,
39
ArgbEncode
(
255
,
0
,
0
,
0
)
,
40
CFX_FillRenderOptions
::
EvenOddOptions
(
)
)
;
41
}
CFX_DrawUtils
Definition
cfx_drawutils.h:14
CFX_DrawUtils::DrawFocusRect
static void DrawFocusRect(CFX_RenderDevice *render_device, const CFX_Matrix &user_to_device, const CFX_FloatRect &view_bounding_box)
Definition
cfx_drawutils.cpp:16
CFX_FloatRect
Definition
fx_coordinates.h:189
CFX_FloatRect::left
float left
Definition
fx_coordinates.h:273
CFX_FloatRect::bottom
float bottom
Definition
fx_coordinates.h:274
CFX_FloatRect::right
float right
Definition
fx_coordinates.h:275
CFX_FloatRect::top
float top
Definition
fx_coordinates.h:276
CFX_GraphStateData
Definition
cfx_graphstatedata.h:16
CFX_GraphStateData::m_LineWidth
float m_LineWidth
Definition
cfx_graphstatedata.h:34
CFX_GraphStateData::m_DashPhase
float m_DashPhase
Definition
cfx_graphstatedata.h:32
CFX_Matrix
Definition
fx_coordinates.h:452
CFX_Path::Point
Definition
cfx_path.h:20
CFX_Path::Point::Type
Type
Definition
cfx_path.h:22
CFX_Path::Point::Type::kMove
@ kMove
CFX_Path::Point::Type::kLine
@ kLine
CFX_Path
Definition
cfx_path.h:18
CFX_Path::AppendPoint
void AppendPoint(const CFX_PointF &point, Point::Type type)
Definition
cfx_path.cpp:289
CFX_RenderDevice
Definition
cfx_renderdevice.h:39
CFX_RenderDevice::DrawPath
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options)
Definition
cfx_renderdevice.cpp:603
ArgbEncode
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition
fx_dib.h:118
CFX_FillRenderOptions
Definition
cfx_fillrenderoptions.h:11
CFX_FillRenderOptions::EvenOddOptions
static constexpr CFX_FillRenderOptions EvenOddOptions()
Definition
cfx_fillrenderoptions.h:26
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxge
cfx_drawutils.cpp
Generated on Thu Nov 14 2024 00:59:26 for Qt by
1.12.0