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_annotcontext.cpp
Go to the documentation of this file.
1
// Copyright 2018 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_annotcontext.h"
8
9
#
include
<
utility
>
10
11
#
include
"core/fpdfapi/page/cpdf_form.h"
12
#
include
"core/fpdfapi/page/cpdf_page.h"
13
#
include
"core/fpdfapi/parser/cpdf_dictionary.h"
14
#
include
"core/fpdfapi/parser/cpdf_stream.h"
15
#
include
"third_party/base/check.h"
16
17
#
ifdef
SetForm
18
#
undef
SetForm
19
#
endif
20
21
CPDF_AnnotContext
::
CPDF_AnnotContext
(
RetainPtr
<CPDF_Dictionary> pAnnotDict,
22
IPDF_Page
* pPage)
23
:
m_pAnnotDict
(
std
::
move
(
pAnnotDict
)),
m_pPage
(
pPage
) {
24
DCHECK(m_pAnnotDict);
25
DCHECK(m_pPage);
26
DCHECK(m_pPage->AsPDFPage());
27
}
28
29
CPDF_AnnotContext
::~
CPDF_AnnotContext
() =
default
;
30
31
void
CPDF_AnnotContext
::
SetForm
(
RetainPtr
<CPDF_Stream> pStream) {
32
if
(!pStream)
33
return
;
34
35
// Reset the annotation matrix to be the identity matrix, since the
36
// appearance stream already takes matrix into account.
37
pStream->GetMutableDict()->SetMatrixFor(
"Matrix"
,
CFX_Matrix
(
)
);
38
39
m_pAnnotForm = std::make_unique<CPDF_Form>(
40
m_pPage->GetDocument(), m_pPage->AsPDFPage()->GetMutableResources(),
41
pStream);
42
m_pAnnotForm->ParseContent();
43
}
CFX_Matrix
Definition
fx_coordinates.h:452
CFX_Matrix::CFX_Matrix
CFX_Matrix()=default
CPDF_AnnotContext
Definition
cpdf_annotcontext.h:24
CPDF_AnnotContext::~CPDF_AnnotContext
~CPDF_AnnotContext()
CPDF_AnnotContext::SetForm
void SetForm(RetainPtr< CPDF_Stream > pStream)
Definition
cpdf_annotcontext.cpp:31
CPDF_AnnotContext::CPDF_AnnotContext
CPDF_AnnotContext(RetainPtr< CPDF_Dictionary > pAnnotDict, IPDF_Page *pPage)
Definition
cpdf_annotcontext.cpp:21
IPDF_Page
Definition
ipdf_page.h:21
fxcrt::RetainPtr
Definition
retain_ptr.h:29
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
page
cpdf_annotcontext.cpp
Generated on Sat Sep 21 2024 00:52:19 for Qt by
1.12.0