struct GPointx and y. It is used to
represent a location on the graphics plane.
| Fields | |
| Constructor | |
GPoint(x, y) | Creates a GPoint object with the specified x and y coordinates. |
| Methods | |
Returns a printable string representation of this GPoint. | |
GPoint(); GPoint(double x, double y);
GPoint object with the specified x
and y coordinates. If the coordinates are not supplied,
the default constructor sets these fields to 0. The GPoint fields x and
y can also directly accessed using dot notation.
Usage:
GPoint origin; GPoint pt(x, y); pt.x = 44.5; if (pt.x < pt.y) ...
string toString() const;
GPoint to a string in the form
"(x, y)".
Usage:
string str = pt.toString();