Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreSize.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_SIZE__
8#define __HDI_CORE_SIZE__
9
10#include "hdicoreAngle.h"
11
12namespace hdi
13{
14 namespace geo
15 {
16 class Size;
17 }
18
19 namespace core
20 {
24 class Size
25 {
26 public:
30 double width;
31
35 double height;
36
43
52 Size(const double width_, const double height_);
53
61 Size(const Size& size_);
62
68 virtual ~Size();
69
78 virtual Size& operator=(const Size& rhs_);
79
88 virtual bool operator==(const Size& rhs_) const;
89
98 virtual bool operator!=(const Size& rhs_) const;
99
108 virtual Size operator+(const Size& rhs_) const;
109
119 virtual Size& operator+=(const Size& rhs_);
120
130 virtual Size operator-(const Size& rhs_) const;
131
142 virtual Size& operator-=(const Size& rhs_);
143
151 virtual Angle diagonalAngle() const;
152
161 virtual double diagonalLength() const;
162
163
164 private:
165 friend geo::Size* __accessImpl(const Size&);
166 friend Size __accessCtor(const geo::Size&);
167
171 geo::Size* __impl;
172
178 Size(const geo::Size&);
179 };
180
181 typedef std::unique_ptr<Size> SizeUP;
182 typedef std::shared_ptr<Size> SizeSP;
183 typedef std::weak_ptr<Size> SizeWP;
184
185 extern geo::Size* __accessImpl(const Size&);
186 extern Size __accessCtor(const geo::Size&);
187 }
188}
189
190#endif
191// __HDI_CORE_SIZE__
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:26
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:25
Size(const double width_, const double height_)
Size constructor, taking width and height arguments.
virtual double diagonalLength() const
Gets the length of the hypotenuse formed from the top-left to the bottom-right of the "box" made by t...
virtual Size & operator+=(const Size &rhs_)
Allows two sizes to have their width and height values added and assigned using the += operator.
virtual bool operator==(const Size &rhs_) const
Tests whether a given Size object is the same as another.
virtual bool operator!=(const Size &rhs_) const
Tests whether a given Size object is not the same as another.
virtual Size operator-(const Size &rhs_) const
Allows two sizes to have their width and height values subtracted using the - operator.
virtual Size & operator-=(const Size &rhs_)
Allows two sizes to have their width and height values subtracted and assigned using the -= operator.
Size(const Size &size_)
Size copy constructor.
virtual Angle diagonalAngle() const
Gets the angle from the top-left to the bottom-right of the "box" made by the Size object.
virtual ~Size()
Size destructor.
virtual Size operator+(const Size &rhs_) const
Allows two sizes to have their width and height values added using the + operator.
double width
Width of the item.
Definition: hdicoreSize.h:30
Size()
Default Size constructor; sets width and height to 0.0.
double height
Definition: hdicoreSize.h:35
virtual Size & operator=(const Size &rhs_)
Sets a Size object from another Size object.
Header file for describing angles.