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_formobject.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_formobject.h"
8
9
#
include
<
utility
>
10
11
#
include
"core/fpdfapi/page/cpdf_form.h"
12
13
CPDF_FormObject::
CPDF_FormObject
(int32_t content_stream,
14
std::unique_ptr<CPDF_Form> pForm,
15
const
CFX_Matrix
& matrix)
16
:
CPDF_PageObject
(
content_stream
)
,
17
m_pForm
(
std
::
move
(
pForm
)),
18
m_FormMatrix
(
matrix
)
{}
19
20
CPDF_FormObject::~
CPDF_FormObject
() =
default
;
21
22
void
CPDF_FormObject::
Transform
(
const
CFX_Matrix
& matrix) {
23
m_FormMatrix
.
Concat
(
matrix
)
;
24
CalcBoundingBox
(
)
;
25
SetDirty
(
true
);
26
}
27
28
bool
CPDF_FormObject::
IsForm
()
const
{
29
return
true
;
30
}
31
32
CPDF_FormObject* CPDF_FormObject::
AsForm
() {
33
return
this
;
34
}
35
36
const
CPDF_FormObject* CPDF_FormObject::
AsForm
()
const
{
37
return
this
;
38
}
39
40
CPDF_PageObject
::
Type
CPDF_FormObject::
GetType
()
const
{
41
return
Type
::
kForm
;
42
}
43
44
void
CPDF_FormObject::
CalcBoundingBox
() {
45
SetRect(m_FormMatrix.TransformRect(m_pForm->CalcBoundingBox()));
46
}
47
48
void
CPDF_FormObject::
SetFormMatrix
(
const
CFX_Matrix
& matrix) {
49
m_FormMatrix
=
matrix;
50
CalcBoundingBox
(
)
;
51
}
CFX_Matrix
Definition
fx_coordinates.h:452
CFX_Matrix::operator=
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_Matrix::Concat
void Concat(const CFX_Matrix &right)
Definition
fx_coordinates.h:490
CFX_Matrix::CFX_Matrix
CFX_Matrix(const CFX_Matrix &other)=default
CPDF_FormObject::IsForm
bool IsForm() const override
Definition
cpdf_formobject.cpp:28
CPDF_FormObject::GetType
Type GetType() const override
Definition
cpdf_formobject.cpp:40
CPDF_FormObject::Transform
void Transform(const CFX_Matrix &matrix) override
Definition
cpdf_formobject.cpp:22
CPDF_FormObject::CPDF_FormObject
CPDF_FormObject(int32_t content_stream, std::unique_ptr< CPDF_Form > pForm, const CFX_Matrix &matrix)
Definition
cpdf_formobject.cpp:13
CPDF_FormObject::CalcBoundingBox
void CalcBoundingBox()
Definition
cpdf_formobject.cpp:44
CPDF_FormObject::~CPDF_FormObject
~CPDF_FormObject() override
CPDF_FormObject::SetFormMatrix
void SetFormMatrix(const CFX_Matrix &matrix)
Definition
cpdf_formobject.cpp:48
CPDF_FormObject::AsForm
CPDF_FormObject * AsForm() override
Definition
cpdf_formobject.cpp:32
CPDF_FormObject::AsForm
const CPDF_FormObject * AsForm() const override
Definition
cpdf_formobject.cpp:36
CPDF_PageObject
Definition
cpdf_pageobject.h:27
CPDF_PageObject::SetDirty
void SetDirty(bool value)
Definition
cpdf_pageobject.h:63
CPDF_PageObject::CPDF_PageObject
CPDF_PageObject(int32_t content_stream)
Definition
cpdf_pageobject.cpp:13
CPDF_PageObject::Type
Type
Definition
cpdf_pageobject.h:30
CPDF_PageObject::Type::kForm
@ kForm
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
page
cpdf_formobject.cpp
Generated on Sat Sep 21 2024 00:52:30 for Qt by
1.12.0