- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Rect.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFRect
6 #define PDFTRON_H_CPPPDFRect
7
8 #include <C/PDF/TRN_Rect.h>
9 #include <Common/Common.h>
10 #include <SDF/Obj.h>
11
12 namespace pdftron {
13 namespace PDF {
14
28 class Rect : public TRN_Rect
29 {
30 public:
31
35 Rect ();
36
41 Rect (SDF::Obj rect);
42
52 Rect (double x1, double y1, double x2, double y2);
53
54 // copy constructor
55 Rect (const Rect& rect);
56
57 // assignment operator
58 Rect& operator=(const Rect& rect);
59
66 void Attach(SDF::Obj obj);
67
78 bool Update(SDF::Obj obj = NULL);
79
80 #ifndef SWIG
81
84 void Get(double& out_x1, double& out_y1, double& out_x2, double& out_y2) const;
85 #endif
86
96 void Set(double x1, double y1, double x2, double y2);
97
101 double Width() const;
102
106 double Height() const;
107
115 bool Contains(double x, double y) const;
116
127 bool IntersectRect(const Rect& rect1, const Rect& rect2);
128
137 void Normalize();
138
144 void Inflate(double amount);
145
152 void Inflate(double x, double y);
153
154
158 double GetX1() const;
159
163 double GetY1() const;
164
168 double GetX2() const;
169
173 double GetY2() const;
174
179 void SetX1(double x1);
180
185 void SetY1(double y1);
186
191 void SetX2(double x2);
192
197 void SetY2(double y2);
198 };
199
200 #include <Impl/Rect.inl>
201
202 }; // namespace PDF
203 }; // namespace pdftron
204
205 #endif // PDFTRON_H_CPPPDFRect
pdftron::PDF::Rect::Update
bool Update(SDF::Obj obj=NULL)
pdftron::PDF::Rect::Get
void Get(double &out_x1, double &out_y1, double &out_x2, double &out_y2) const
pdftron::PDF::Rect::GetY1
double GetY1() const
pdftron::PDF::Rect::SetX1
void SetX1(double x1)
pdftron::PDF::Rect::Attach
void Attach(SDF::Obj obj)
pdftron::PDF::Rect::Set
void Set(double x1, double y1, double x2, double y2)
pdftron::PDF::Rect
Definition: Rect.h:28
pdftron::PDF::Rect::Normalize
void Normalize()
pdftron::PDF::Rect::Rect
Rect()
pdftron::PDF::Rect::GetX2
double GetX2() const
pdftron::PDF::Rect::GetY2
double GetY2() const
Obj.h
pdftron::PDF::Rect::Height
double Height() const
pdftron::PDF::Rect::GetX1
double GetX1() const
Common.h
pdftron::PDF::Rect::Inflate
void Inflate(double amount)
pdftron::PDF::Rect::Width
double Width() const
pdftron::PDF::Rect::operator=
Rect & operator=(const Rect &rect)
pdftron::PDF::Rect::IntersectRect
bool IntersectRect(const Rect &rect1, const Rect &rect2)
pdftron::PDF::Rect::SetY2
void SetY2(double y2)
pdftron::PDF::Rect::Contains
bool Contains(double x, double y) const
pdftron::SDF::Obj
Definition: Obj.h:40
pdftron::PDF::Rect::SetX2
void SetX2(double x2)
pdftron::PDF::Rect::SetY1
void SetY1(double y1)