#include <CNCL/ICoord.h>
CN_ICOORD
CNObject
None
CNCoord
CNICoord
is a data type for managing 2-dimensional integer
coordinates. It is typically used with CNCoord
for pixel
coordinates and world coordinates respectively.
A CNICoord
has int
x and y members which are public
accessible.
CNICoord
s can be automatically converted to CNCoord
s and vice
versa. This is done by applying the conversion factor
CNCoord::scale
.
Constructors:
CNICoord();
CNICoord(CNParam *param);
CNICoord(int vx, int vy);
CNICoord(const CNCoord &v);
CNICoord(const CNICoord &v);
Public accessible members:
int x;
int y;
CNICoord
.
In addition to the member functions required by CNCL, CNICoord
provides:
CNICoord &operator += (const CNICoord &v);
CNICoord &operator -= (const CNICoord &v);
+=
and -=
for integer coordinates,
applying the standard C/C++ operators to the x and y components.
The following static member functions are provided to manipulate the conversion scale setting:
static double CNICoord::get_scale();
static double CNICoord::set_scale(double new_scale);
Global operators:
CNICoord operator + (const CNICoord &a, const CNICoord &b);
CNICoord operator - (const CNICoord &a, const CNICoord &b);
Go to the first, previous, next, last section, table of contents.