libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
primitives.hxx
1#ifndef art__paperback__primitives_hxx_
2#define art__paperback__primitives_hxx_
3
4#include <art/paperback/types.hxx>
5#include <art/paperback/forward.hxx>
6
7namespace Art::Paperback
8{
9
10 /// Represents a point in a two-dimensional space.
11 ///
12 struct Point_2D
13 {
14 /// The X coordinate.
15 ///
16 double x{};
17
18 /// The Y coordinate.
19 ///
20 double y{};
21
22 };
23
24 /// Represents a PDF rectangle.
25 ///
27 {
28 public:
29 /// Constructor.
30 ///
31 Rectangle();
32
33 /// Constructor.
34 ///
35 Rectangle(double, double, double, double);
36
37 double
38 left() const;
39
40 double
41 bottom() const;
42
43 double
44 right() const;
45
46 double
47 top() const;
48
49 /// Create COS array from rectangle.
50 ///
52 to_array() const;
53
54 static
56 letter();
57
58 static
60 legal();
61
62 static
64 tabloid();
65
66 static
68 a3();
69
70 static
72 a4();
73
74 static
76 a5();
77
78 static
80 c3();
81
82 static
84 c4();
85
86 static
88 c5();
89
90 static
92 executive();
93
94 private:
95 double _left{};
96 double _bottom{};
97 double _right{};
98 double _top{};
99
100 };
101
102} // namespace Art::Paperback
103
104#endif
Definition array.hxx:14
Rectangle()
Constructor.
Definition primitives.cxx:11
Carousel::Array to_array() const
Create COS array from rectangle.
Definition primitives.cxx:52
Primary paperback namespace.
Definition array.cxx:6
Represents a point in a two-dimensional space.
Definition primitives.hxx:13
double x
The X coordinate.
Definition primitives.hxx:16
double y
The Y coordinate.
Definition primitives.hxx:20