Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
hdi::core::Point Class Reference

Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document view or a UI window. More...

#include <hdicorePoint.h>

Public Types

typedef std::vector< PointPointVector
 

Public Member Functions

 Point ()
 Default Point constructor; sets x and y to 0.0. More...
 
 Point (const double x_, const double y_)
 Point constructor, taking x and y arguments. More...
 
 Point (const Point &pt_)
 Point copy constructor. More...
 
virtual ~Point ()
 Point destructor. More...
 
virtual Pointoperator= (const Point &rhs_)
 Sets a Point object from another Point object. More...
 
virtual bool operator== (const Point &rhs_) const
 Tests whether a given Point object is the same as another. More...
 
virtual bool operator!= (const Point &rhs_) const
 Tests whether a given Point object is not the same as another. More...
 
virtual Point operator+ (const Point &rhs_) const
 Allows two points to have their x and y values added using the + operator. More...
 
virtual Pointoperator+= (const Point &rhs_)
 Allows two points to have their x and y values added and assigned using the += operator. More...
 
virtual Point operator- (const Point &rhs_) const
 Allows two points to have their x and y values subtracted using the - operator. More...
 
virtual Pointoperator-= (const Point &rhs_)
 Allows two points to have their x and y values subtracted and assigned using the -= operator. More...
 
virtual Point offset (const double tx_, const double ty_) const
 Offsets a point along the x- and y-axes by given amounts. More...
 
virtual bool insidePolygon (const PointVector &points_) const
 Checks if the point is within the provided polygon. More...
 

Public Attributes

double x
 Position on the x-axis.
 
double y
 Position on the y-axis.
 

Friends

plugin::Point * __accessImpl (const Point &)
 
Point __accessCtor (const plugin::Point &)
 

Detailed Description

Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document view or a UI window.

Constructor & Destructor Documentation

hdi::core::Point::Point ( )

Default Point constructor; sets x and y to 0.0.

Author
GW
Date
08/2013
hdi::core::Point::Point ( const double  x_,
const double  y_ 
)

Point constructor, taking x and y arguments.

Author
GW
Date
08/2013
Parameters
x_Position on the x-axis
y_Position on the y-axis
hdi::core::Point::Point ( const Point pt_)

Point copy constructor.

Author
GW
Date
08/2013
Parameters
pt_Existing Point object to copy
virtual hdi::core::Point::~Point ( )
virtual

Point destructor.

Author
GW
Date
08/2013

Member Function Documentation

virtual bool hdi::core::Point::insidePolygon ( const PointVector &  points_) const
virtual

Checks if the point is within the provided polygon.

Author
GW
Date
08/2013
Parameters
points_[]Points that describe the polygon
Returns
true if the point lies within the provided polygon, false otherwise
virtual Point hdi::core::Point::offset ( const double  tx_,
const double  ty_ 
) const
virtual

Offsets a point along the x- and y-axes by given amounts.

Author
GW
Date
08/2013
Parameters
tx_Amount to offset along the x-axis
ty_Amount to offset along the y-axis
Returns
A copy of the target point, offset by the given amounts
Note
Negative values go toward 0.0 if the object to be transformed has a positive x and/or y value; positive values go away from 0.0
virtual bool hdi::core::Point::operator!= ( const Point rhs_) const
virtual

Tests whether a given Point object is not the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Point to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different points, false otherwise
virtual Point hdi::core::Point::operator+ ( const Point rhs_) const
virtual

Allows two points to have their x and y values added using the + operator.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the + operator
Returns
A copy of the target Point, with all x and y values summed together
virtual Point& hdi::core::Point::operator+= ( const Point rhs_)
virtual

Allows two points to have their x and y values added and assigned using the += operator.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the += operator
Returns
The lefthand side of the += operator, with all x and y values summed together
virtual Point hdi::core::Point::operator- ( const Point rhs_) const
virtual

Allows two points to have their x and y values subtracted using the - operator.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the - operator
Returns
A copy of the target Point, with rhs_ x and y values subtracted from this x and y
virtual Point& hdi::core::Point::operator-= ( const Point rhs_)
virtual

Allows two points to have their x and y values subtracted and assigned using the -= operator.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the -= operator
Returns
The lefthand side of the -= operator, with rhs_ x and y values subtracted from this x and y
virtual Point& hdi::core::Point::operator= ( const Point rhs_)
virtual

Sets a Point object from another Point object.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the = operator; Point object to pull values from
Returns
The target Point object, but with its value updated
virtual bool hdi::core::Point::operator== ( const Point rhs_) const
virtual

Tests whether a given Point object is the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Point to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same point, false otherwise