Nana C++ Library  
An open-source C++ framework project
The Nana Programmer's Guide
nana::rectangle

Description

A structure defines a rectangle with coordinates and size.

Model of

None 

Public base classes

None

Data Members

int x;  The x-axis of rectangle.
int y; The y-axis of rectangle.
unsigned width The width of rectangle.
unsigned height The height of rectangle.

Members

rectangle() The default construction, a zero-size rectangle at (0, 0).
rectangle(int x, int y, unsigned width, unsigned height) Constructs a rectangle with specified coordinates and size.
rectangle(const size&) Constructs a rectangle with specified size at coordinate(0, 0).
rectangle(const point& p, const size& s) Constructs a rectangle with specified coordinates and size.
rectangle & pare_off(int pixels) Pares the specified pixels off the rectangle. It's equal to
x += pixels; y + pixels; width -= (pixels << 1); height -= (pixels << 1);
bool operator==(const rectangle& r) const Checks whether the rectangle is equal to r.
bool operator!=(const rectangle& r) const Checks whether the rectangle is not equal to r.

File

nana/basic_types.hpp

Notes

None.

See also

None.


Move to The Nana Programmer's Guide Main Page