Rogue Wave Views |
Rogue Wave Views Documentation Home |
Geometric class. More...
#include <ilviews/base/geometry.h>
Public Member Functions | |
IlvPoint (IlvPos x=0, IlvPos y=0) | |
Constructor. More... | |
IlvPos | getX () const |
Retrieves the current x coordinate. More... | |
IlvPos | getY () const |
Retrieves the current y coordinate. More... | |
void | move (IlvPos x, IlvPos y) |
Sets the new position. More... | |
int | operator!= (const IlvPoint &p) const |
Inequality operator. More... | |
IlvPoint & | operator= (const IlvPoint &p) |
Assignment operator. More... | |
int | operator== (const IlvPoint &p) const |
Equality operator. More... | |
void | set (IlvPos x, IlvPos y) |
Sets the new position. More... | |
void | setX (IlvPos newX) |
Sets the x coordinate. More... | |
void | setY (IlvPos yy) |
Sets the y coordinate. More... | |
void | translate (IlvPos dx, IlvPos dy) |
Translates to a new position. More... | |
void | translate (const IlvPoint &delta) |
Translates to a new position. More... | |
IlvPos | x () const |
Retrieves the current x coordinate. More... | |
void | x (IlvPos newX) |
Sets the x coordinate. More... | |
IlvPos | y () const |
Retrieves the current y coordinate. More... | |
void | y (IlvPos newY) |
Sets the y coordinate. More... | |
Geometric class.
Library: xviews or winviews or mviews (mutually exclusive)
The IlvPoint
class is used to create a point.
IlvDeltaPoint
, IlvFloatPoint
, IlvDoublePoint
. Constructor.
Initializes a point with defined coordinates.
x | The x coordinate of the new point. |
y | The y coordinate of the new point. |
IlvPos IlvPoint::getX | ( | ) | const |
Retrieves the current x coordinate.
IlvPos IlvPoint::getY | ( | ) | const |
Retrieves the current y coordinate.
Sets the new position.
x | The new x coordinate of this object. |
y | The new y coordinate of this object. |
int IlvPoint::operator!= | ( | const IlvPoint & | p | ) | const |
Inequality operator.
p | The point to compare to. |
1
if p is different than the current object. Assignment operator.
p | The point that is copied to the current object. |
int IlvPoint::operator== | ( | const IlvPoint & | p | ) | const |
Equality operator.
p | The point to compare to. |
0
if p is different than the current object. Sets the new position.
x | The new x coordinate of this object. |
y | The new y coordinate of this object. |
void IlvPoint::setX | ( | IlvPos | newX | ) |
Sets the x coordinate.
newX | The new x coordinate of this object. |
void IlvPoint::setY | ( | IlvPos | yy | ) |
Sets the y coordinate.
yy | The new y coordinate of this object. |
Translates to a new position.
Shifts an existing point to another location by means of a vector. You indicate the x and y translation values that represent the distance between the current position of the point and the target future position.
dx | The x translation to be applied to the object. |
dy | The y translation to be applied to the object. |
void IlvPoint::translate | ( | const IlvPoint & | delta | ) |
Translates to a new position.
Shifts an existing point to another location by means of a vector. You indicate the x and y translation values that represent the distance between the current position of the point and the target future position.
delta | The translation vector that is applied. |
IlvPos IlvPoint::x | ( | ) | const |
Retrieves the current x coordinate.
void IlvPoint::x | ( | IlvPos | newX | ) |
Sets the x coordinate.
newX | The new x coordinate of this object. |
IlvPos IlvPoint::y | ( | ) | const |
Retrieves the current y coordinate.
void IlvPoint::y | ( | IlvPos | newY | ) |
Sets the y coordinate.
newY | The new y coordinate of this object. |
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.