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
page_renderer.h
Go to the documentation of this file.
1
// Copyright 2023 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
#
ifndef
SAMPLES_HELPERS_PAGE_RENDERER_H_
6
#
define
SAMPLES_HELPERS_PAGE_RENDERER_H_
7
8
#
include
<
string
>
9
10
#
include
"public/fpdfview.h"
11
12
// Renderer for a single page.
13
class
PageRenderer
{
14
public
:
15
virtual
~
PageRenderer
();
16
17
// Returns `true` if the rendered output exists. Must call `Finish()` first.
18
virtual
bool
HasOutput
()
const
= 0;
19
20
// Starts rendering the page, returning `false` on failure.
21
virtual
bool
Start
() = 0;
22
23
// Continues rendering the page, returning `false` when complete.
24
virtual
bool
Continue
();
25
26
// Finishes rendering the page.
27
virtual
void
Finish
(FPDF_FORMHANDLE form) = 0;
28
29
// Writes rendered output to a file, returning `false` on failure.
30
virtual
bool
Write
(
const
std
::string& name,
int
page_index,
bool
md5) = 0;
31
32
protected
:
33
PageRenderer
(FPDF_PAGE page,
int
width,
int
height,
int
flags);
34
35
FPDF_PAGE
page
() {
return
page_; }
36
int
width
()
const
{
return
width_; }
37
int
height
()
const
{
return
height_; }
38
int
flags
()
const
{
return
flags_; }
39
40
private
:
41
FPDF_PAGE page_;
42
int
width_;
43
int
height_;
44
int
flags_;
45
};
46
47
#
endif
// SAMPLES_HELPERS_PAGE_RENDERER_H_
PageRenderer
Definition
page_renderer.h:13
PageRenderer::~PageRenderer
virtual ~PageRenderer()
PageRenderer::HasOutput
virtual bool HasOutput() const =0
PageRenderer::Write
virtual bool Write(const std::string &name, int page_index, bool md5)=0
PageRenderer::PageRenderer
PageRenderer(FPDF_PAGE page, int width, int height, int flags)
Definition
page_renderer.cc:9
PageRenderer::width
int width() const
Definition
page_renderer.h:36
PageRenderer::Start
virtual bool Start()=0
PageRenderer::Continue
virtual bool Continue()
Definition
page_renderer.cc:14
PageRenderer::Finish
virtual void Finish(FPDF_FORMHANDLE form)=0
PageRenderer::height
int height() const
Definition
page_renderer.h:37
PageRenderer::page
FPDF_PAGE page()
Definition
page_renderer.h:35
PageRenderer::flags
int flags() const
Definition
page_renderer.h:38
std
Definition
qfloat16.h:492
qtwebengine
src
3rdparty
chromium
third_party
pdfium
samples
helpers
page_renderer.h
Generated on Sat Sep 21 2024 00:59:58 for Qt by
1.12.0