Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
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 
12 namespace 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 
42  Size();
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::auto_ptr<Size> SizeAP;
182 
183  extern geo::Size* __accessImpl(const Size&);
184  extern Size __accessCtor(const geo::Size&);
185  }
186 }
187 
188 #endif
189 // __HDI_CORE_SIZE__
Header file for describing angles.
virtual Size & operator=(const Size &rhs_)
Sets a Size object from another Size object.
double height
Definition: hdicoreSize.h:35
virtual Size operator+(const Size &rhs_) const
Allows two sizes to have their width and height values added using the + operator.
virtual Size & operator+=(const Size &rhs_)
Allows two sizes to have their width and height values added and assigned using the += operator...
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:24
virtual Angle diagonalAngle() const
Gets the angle from the top-left to the bottom-right of the "box" made by the Size object...
Definition: hdicoreaiArray.h:12
double width
Width of the item.
Definition: hdicoreSize.h:30
virtual ~Size()
Size destructor.
virtual bool operator!=(const Size &rhs_) const
Tests whether a given Size object is not the same as another.
virtual bool operator==(const Size &rhs_) const
Tests whether a given Size object is the same as another.
virtual Size & operator-=(const Size &rhs_)
Allows two sizes to have their width and height values subtracted and assigned using the -= operator...
Size()
Default Size constructor; sets width and height to 0.0.
virtual Size operator-(const Size &rhs_) const
Allows two sizes to have their width and height values subtracted using the - operator.
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:25
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...