SimpleCxxLib
packageclass GDimension
Constructor | |
GDimension(width, height) | Creates a GDimension object with the specified width and height coordinates. |
Methods | |
Returns the height component of the GDimension object. | |
Returns the width component of the GDimension object. | |
Converts the GDimension to a string in the form "( width, height)" . |
GDimension(); GDimension(double width, double height);
GDimension
object with the specified
width
and height
coordinates. If the
coordinates are not supplied, the default constructor sets these
fields to 0.
Usage:
GDimension empty; GDimension dim(width, height);
double getWidth() const;
GDimension
object.
Usage:
double width = dim.getWidth();
double getHeight() const;
GDimension
object.
Usage:
double height = dim.getHeight();
string toString() const;
GDimension
to a string in the form
"(
width,
height)"
.
Usage:
string str = dim.toString();