Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreArtboardPoint.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_ARTBOARD_POINT__
8 #define __HDI_CORE_ARTBOARD_POINT__
9 
10 #include <vector>
11 
12 #include "hdicoreAngle.h"
13 
14 namespace hdi
15 {
16  namespace plugin
17  {
18  class ArtboardPoint;
19  }
20 
21  namespace core
22  {
23  class TransformMatrix;
24 
29  {
30  public:
31  typedef std::vector<ArtboardPoint> ArtboardPointVector;
32 
36  double x;
37 
41  double y;
42 
48  ArtboardPoint();
49 
57  ArtboardPoint(const ArtboardPoint& pt_);
58 
67  ArtboardPoint(const double x_, const double y_);
68 
74  virtual ~ArtboardPoint();
75 
85  static ArtboardPoint LengthAngle(const double length_, const Angle& angle_);
86 
96  virtual bool closeTo(const ArtboardPoint& compare_, const double tol_) const;
97 
106  virtual double dotProduct(const ArtboardPoint& p2_) const;
107 
120  virtual ArtboardPoint offset(const double tx_, const double ty_) const;
121 
131  virtual ArtboardPoint rotate(const ArtboardPoint& origin_, const Angle& angle_) const;
132 
142  virtual ArtboardPoint move(const double length_, const Angle& angle_) const;
143 
152  virtual ArtboardPoint transform(const TransformMatrix& m_) const;
153 
162  virtual bool insidePolygon(const ArtboardPointVector& points_) const;
163 
172  virtual ArtboardPoint& operator=(const ArtboardPoint& rhs_);
173 
185  virtual bool operator==(const ArtboardPoint& rhs_) const;
186 
198  virtual bool operator!=(const ArtboardPoint& rhs_) const;
199 
208  virtual bool operator<(const ArtboardPoint& rhs_) const;
209 
218  virtual bool operator<=(const ArtboardPoint& rhs_) const;
219 
228  virtual bool operator>(const ArtboardPoint& rhs_) const;
229 
238  virtual bool operator>=(const ArtboardPoint& rhs_) const;
239 
248  virtual ArtboardPoint operator+(const double rhs_) const;
249 
258  virtual ArtboardPoint operator-(const double rhs_) const;
259 
268  virtual ArtboardPoint operator*(const double rhs_) const;
269 
278  virtual ArtboardPoint operator/(const double rhs_) const;
279 
288  virtual ArtboardPoint operator+(const ArtboardPoint& rhs_) const;
289 
298  virtual ArtboardPoint operator-(const ArtboardPoint& rhs_) const;
299 
308  virtual ArtboardPoint operator*(const ArtboardPoint& rhs_) const;
309 
318  virtual ArtboardPoint operator/(const ArtboardPoint& rhs_) const;
319 
328  virtual ArtboardPoint& operator+=(const double rhs_);
329 
339  virtual ArtboardPoint& operator-=(const double rhs_);
340 
350  virtual ArtboardPoint& operator*=(const double rhs_);
351 
361  virtual ArtboardPoint& operator/=(const double rhs_);
362 
371  virtual ArtboardPoint& operator+=(const ArtboardPoint& rhs_);
372 
382  virtual ArtboardPoint& operator-=(const ArtboardPoint& rhs_);
383 
393  virtual ArtboardPoint& operator*=(const ArtboardPoint& rhs_);
394 
403  virtual ArtboardPoint& operator/=(const ArtboardPoint& rhs_);
404 
413  virtual Angle operator^(const ArtboardPoint& rhs_) const;
414 
423  virtual double operator|(const ArtboardPoint& rhs_) const;
424 
425 
426  private:
427  friend plugin::ArtboardPoint* __accessImpl(const ArtboardPoint&);
428  friend ArtboardPoint __accessCtor(const plugin::ArtboardPoint&);
429 
433  plugin::ArtboardPoint* __impl;
434 
440  ArtboardPoint(const plugin::ArtboardPoint&);
441  };
442 
443  typedef std::auto_ptr<ArtboardPoint> ArtboardPointAP;
444 
445  extern plugin::ArtboardPoint* __accessImpl(const ArtboardPoint&);
446  extern ArtboardPoint __accessCtor(const plugin::ArtboardPoint&);
447  }
448 }
449 
450 #endif
451 // __HDI_CORE_ARTBOARD_POINT__
Header file for describing angles.
hdi::core::Date operator+(const hdi::core::Duration &lhs_, const hdi::core::Date &rhs_)
Adds a duration to a date.
double y
Position on the y-axis.
Definition: hdicoreArtboardPoint.h:41
Allows for 2-dimensional transformations in a single application via matrix math. ...
Definition: hdicoreTransformMatrix.h:26
double x
Position on the x-axis.
Definition: hdicoreArtboardPoint.h:36
Definition: hdicoreaiArray.h:12
hdi::core::Angle operator*(const double lhs_, const hdi::core::Angle &rhs_)
Allows a constant to be multipled by an Angle object.
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:25
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:28