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_path.cpp
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
#
include
"core/fpdfapi/page/cpdf_path.h"
8
9
CPDF_Path
::
CPDF_Path
() =
default
;
10
11
CPDF_Path
::
CPDF_Path
(
const
CPDF_Path
& that) =
default
;
12
13
CPDF_Path
::~
CPDF_Path
() =
default
;
14
15
const
std
::
vector
<
CFX_Path
::
Point
>&
CPDF_Path
::
GetPoints
()
const
{
16
return
m_Ref.GetObject()->GetPoints();
17
}
18
19
void
CPDF_Path
::
ClosePath
() {
20
m_Ref.GetPrivateCopy()->ClosePath();
21
}
22
23
CFX_PointF
CPDF_Path
::
GetPoint
(
int
index)
const
{
24
return
m_Ref.GetObject()->GetPoint(index);
25
}
26
27
CFX_FloatRect
CPDF_Path
::
GetBoundingBox
()
const
{
28
return
m_Ref.GetObject()->GetBoundingBox();
29
}
30
31
CFX_FloatRect
CPDF_Path
::
GetBoundingBoxForStrokePath
(
float
line_width,
32
float
miter_limit)
const
{
33
return
m_Ref.GetObject()->GetBoundingBoxForStrokePath(line_width,
34
miter_limit);
35
}
36
37
bool
CPDF_Path
::
IsRect
()
const
{
38
return
m_Ref.GetObject()->IsRect();
39
}
40
41
void
CPDF_Path
::
Transform
(
const
CFX_Matrix
& matrix) {
42
m_Ref.GetPrivateCopy()->Transform(matrix);
43
}
44
45
void
CPDF_Path
::
Append
(
const
CFX_Path
& path,
const
CFX_Matrix
* pMatrix) {
46
m_Ref.GetPrivateCopy()->Append(path, pMatrix);
47
}
48
49
void
CPDF_Path
::
AppendFloatRect
(
const
CFX_FloatRect
& rect) {
50
m_Ref.GetPrivateCopy()->AppendFloatRect(rect);
51
}
52
53
void
CPDF_Path
::
AppendRect
(
float
left,
float
bottom,
float
right,
float
top) {
54
m_Ref.GetPrivateCopy()->AppendRect(left, bottom, right, top);
55
}
56
57
void
CPDF_Path
::
AppendPoint
(
const
CFX_PointF
& point,
58
CFX_Path
::
Point
::
Type
type) {
59
CFX_Path
data;
60
data
.
AppendPoint
(
point
,
type
)
;
61
Append
(
data
,
nullptr
)
;
62
}
63
64
void
CPDF_Path
::
AppendPointAndClose
(
const
CFX_PointF
& point,
65
CFX_Path
::
Point
::
Type
type) {
66
CFX_Path
data;
67
data
.
AppendPointAndClose
(
point
,
type
)
;
68
Append
(
data
,
nullptr
)
;
69
}
CFX_FloatRect
Definition
fx_coordinates.h:185
CFX_Matrix
Definition
fx_coordinates.h:440
CFX_Path::Point
Definition
cfx_path.h:20
CFX_Path::Point::Type
Type
Definition
cfx_path.h:22
CFX_Path
Definition
cfx_path.h:18
CFX_Path::AppendPointAndClose
void AppendPointAndClose(const CFX_PointF &point, Point::Type type)
Definition
cfx_path.cpp:294
CFX_Path::AppendPoint
void AppendPoint(const CFX_PointF &point, Point::Type type)
Definition
cfx_path.cpp:290
CPDF_Path
Definition
cpdf_path.h:15
CPDF_Path::AppendRect
void AppendRect(float left, float bottom, float right, float top)
Definition
cpdf_path.cpp:53
CPDF_Path::Append
void Append(const CFX_Path &path, const CFX_Matrix *pMatrix)
Definition
cpdf_path.cpp:45
CPDF_Path::AppendPoint
void AppendPoint(const CFX_PointF &point, CFX_Path::Point::Type type)
Definition
cpdf_path.cpp:57
CPDF_Path::AppendFloatRect
void AppendFloatRect(const CFX_FloatRect &rect)
Definition
cpdf_path.cpp:49
CPDF_Path::GetBoundingBoxForStrokePath
CFX_FloatRect GetBoundingBoxForStrokePath(float line_width, float miter_limit) const
Definition
cpdf_path.cpp:31
CPDF_Path::GetBoundingBox
CFX_FloatRect GetBoundingBox() const
Definition
cpdf_path.cpp:27
CPDF_Path::GetPoints
const std::vector< CFX_Path::Point > & GetPoints() const
Definition
cpdf_path.cpp:15
CPDF_Path::ClosePath
void ClosePath()
Definition
cpdf_path.cpp:19
CPDF_Path::IsRect
bool IsRect() const
Definition
cpdf_path.cpp:37
CPDF_Path::CPDF_Path
CPDF_Path()
CPDF_Path::~CPDF_Path
~CPDF_Path()
CPDF_Path::AppendPointAndClose
void AppendPointAndClose(const CFX_PointF &point, CFX_Path::Point::Type type)
Definition
cpdf_path.cpp:64
CPDF_Path::GetPoint
CFX_PointF GetPoint(int index) const
Definition
cpdf_path.cpp:23
CPDF_Path::Transform
void Transform(const CFX_Matrix &matrix)
Definition
cpdf_path.cpp:41
CPDF_Path::CPDF_Path
CPDF_Path(const CPDF_Path &that)
CFX_PointF
CFX_PTemplate< float > CFX_PointF
Definition
fx_coordinates.h:51
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
page
cpdf_path.cpp
Generated on
for Qt by
1.18.0