forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDestination.h
More file actions
132 lines (94 loc) · 3.13 KB
/
Destination.h
File metadata and controls
132 lines (94 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
//
// Destination.h
//
// $Id: //poco/Main/PDF/include/Poco/PDF/Destination.h#4 $
//
// Library: PDF
// Package: PDFCore
// Module: Destination
//
// Definition of the Destination class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef PDF_Destination_INCLUDED
#define PDF_Destination_INCLUDED
#include "Poco/PDF/PDF.h"
#include "Poco/PDF/Resource.h"
namespace Poco {
namespace PDF {
class PDF_API Destination: public Resource<HPDF_Destination>
/// Destination class represents destination resource.
{
public:
Destination(HPDF_Doc* pPDF, const HPDF_Destination& resource, const std::string& name = "");
/// Creates the destination.
~Destination();
/// Destroys the destination.
void positionAndZoom(float x, float y, float zoom);
/// Sets the position and zoom for destination.
void fit();
/// Sets the appearance of the page to displaying entire page within the window.
void fitHorizontal(float top);
/// Defines the appearance of a page to magnifying to fit the height of the
/// page within the window and setting the top position of the page to the
/// value of the "top" parameter.
void fitVertical(float left);
/// Defines the appearance of a page to magnifying to fit the height of the
/// page within the window and setting the left position of the page to the
/// value of the "left" parameter.
void fitRectangle(float left, float top, float right, float bottom);
/// Defines the appearance of a page to magnifying the page to fit a rectangle
/// specified by left, bottom, right and top.
void fitWindow();
/// Sets the appearance of the page to magnifying to fit the bounding box of
/// the page within the window.
void fitWindowHorizontal(float top);
/// Defines the appearance of a page to magnifying to fit the width of the
/// bounding box of the page within the window and setting the top position
/// of the page to the value of the "top" parameter.
void fitWindowVertical(float left);
/// Defines the appearance of a page to magnifying to fit the height of the
/// bounding box of the page within the window and setting the left position
/// of the page to the value of the "left" parameter.
};
//
// inlines
//
inline void Destination::positionAndZoom(float x, float y, float zoom)
{
HPDF_Destination_SetXYZ(handle(), x, y, zoom);
}
inline void Destination::fit()
{
HPDF_Destination_SetFit(handle());
}
inline void Destination::fitHorizontal(float top)
{
HPDF_Destination_SetFitH(handle(), top);
}
inline void Destination::fitVertical(float left)
{
HPDF_Destination_SetFitV(handle(), left);
}
inline void Destination::fitRectangle(float left, float top, float right, float bottom)
{
HPDF_Destination_SetFitR(handle(), left, bottom, right, top);
}
inline void Destination::fitWindow()
{
HPDF_Destination_SetFitB(handle());
}
inline void Destination::fitWindowHorizontal(float top)
{
HPDF_Destination_SetFitBH(handle(), top);
}
inline void Destination::fitWindowVertical(float left)
{
HPDF_Destination_SetFitBV(handle(), left);
}
} } // namespace Poco::PDF
#endif // PDF_Destination_INCLUDED