Hot Door CORE  0.7.0
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__
virtual ArtboardPoint & operator*=(const double rhs_)
Allows a value to be multiplied with, and assigned to, both this->x and this->y using the = operator...
Header file for describing angles.
virtual bool operator!=(const ArtboardPoint &rhs_) const
Allows two ArtboardPoint objects to be compared with the != operator.
virtual ArtboardPoint & operator=(const ArtboardPoint &rhs_)
Allows one ArtboardPoint object to be assigned from another.
virtual ArtboardPoint & operator/=(const double rhs_)
Allows both this->x and this->y to be divided by a value, and assigned, using the /= operator...
virtual bool operator==(const ArtboardPoint &rhs_) const
Allows two ArtboardPoint objects to be compared with the == operator.
virtual bool insidePolygon(const ArtboardPointVector &points_) const
Checks if the point is within the provided polygon.
virtual ArtboardPoint & operator+=(const double rhs_)
Allows a value to be added and assigned to both this->x and this->y using the += operator.
virtual double operator|(const ArtboardPoint &rhs_) const
Gets the distance between this and rhs_.
virtual ArtboardPoint rotate(const ArtboardPoint &origin_, const Angle &angle_) const
Rotates the point about a given "origin" point by a certain angle.
virtual bool operator>(const ArtboardPoint &rhs_) const
Allows two ArtboardPoint objects to be compared with the > operator.
virtual bool operator<=(const ArtboardPoint &rhs_) const
Allows two ArtboardPoint objects to be compared with the <= operator.
virtual bool closeTo(const ArtboardPoint &compare_, const double tol_) const
Gets whether a given point is within a certain tolerance ("close to") the target point.
virtual Angle operator^(const ArtboardPoint &rhs_) const
Gets the angle of the vector (this, rhs_), if this were moved to the origin.
static ArtboardPoint LengthAngle(const double length_, const Angle &angle_)
"Named constructor" for a point that is a given length and angle away from the origin ...
virtual ArtboardPoint operator/(const double rhs_) const
Allows both this->x and this->y to be divided by a value using the / operator.
virtual ArtboardPoint operator+(const double rhs_) const
Allows a value to be added to both this->x and this->y using the + operator.
virtual bool operator>=(const ArtboardPoint &rhs_) const
Allows two ArtboardPoint objects to be compared with the >= operator.
double y
Position on the y-axis.
Definition: hdicoreArtboardPoint.h:41
virtual ArtboardPoint offset(const double tx_, const double ty_) const
Offsets a point along the x- and y-axes by given amounts.
virtual ArtboardPoint operator-(const double rhs_) const
Allows a value to be subtracted from both this->x and this->y using the - operator.
Allows for 2-dimensional transformations in a single application via matrix math. ...
Definition: hdicoreTransformMatrix.h:26
virtual ArtboardPoint operator*(const double rhs_) const
Allows a value to be multiplied with both this->x and this->y using the * operator.
ArtboardPoint()
Default ArtboardPoint constructor, setting the point to (0,0)
virtual ArtboardPoint transform(const TransformMatrix &m_) const
Transforms a point via a 2-dimensional transformation matrix.
double x
Position on the x-axis.
Definition: hdicoreArtboardPoint.h:36
virtual ArtboardPoint & operator-=(const double rhs_)
Allows a value to be subtracted from, and assigned to, both this->x and this->y using the -= operator...
virtual double dotProduct(const ArtboardPoint &p2_) const
Gets the dot product of two ArtboardPoint objects.
virtual ArtboardPoint move(const double length_, const Angle &angle_) const
"Moves" a point by a given length and angle away from its current position
Definition: hdicoreaiArray.h:12
virtual bool operator<(const ArtboardPoint &rhs_) const
Allows two ArtboardPoint objects to be compared with the < operator.
virtual ~ArtboardPoint()
ArtboardPoint destructor.
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