|
PNTK
|
#include <gui_rect.h>
Public Member Functions | |
| gui_rect () | |
| gui_rect (int x, int y, int width, int height) | |
| gui_rect (const gui_point &a, const gui_point &b) | |
| gui_rect (const gui_point &point, const gui_size &size) | |
| int | get_x () const |
| int | get_y () const |
| int | get_x2 () const |
| int | get_y2 () const |
| int | get_width () const |
| int | get_height () const |
| gui_size | get_size () const |
| gui_point | get_top_left () const |
| gui_point | get_top_right () const |
| gui_point | get_bottom_right () const |
| gui_point | get_bottom_left () const |
| int | get_center_x () const |
| int | get_center_y () const |
| gui_point | get_center () const |
| void | set_x (int x) |
| void | set_y (int y) |
| void | set_width (int width) |
| void | set_height (int height) |
| void | set_position (const gui_point &point) |
| void | set_size (const gui_size &size) |
| void | set (int x, int y, int width, int height) |
| bool | contains_point (const gui_point &point) const |
| bool | intersects (const gui_rect &rect) const |
| bool | operator== (const gui_rect &rhs) const |
| bool | operator!= (const gui_rect &rhs) const |
A portable x, y, width and height class.
| pntk::gui_rect::gui_rect | ( | ) |
Creates a rect object with an x, y, width, and height of 0
| pntk::gui_rect::gui_rect | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height | ||
| ) |
Creates a rect object with the given x, y width and height
Creates a rect object with the given points
Creates a rect object with the given starting point and size.
| bool pntk::gui_rect::contains_point | ( | const gui_point & | point | ) | const |
Returns true if the point is inside the rectangle.
| gui_point pntk::gui_rect::get_bottom_left | ( | ) | const |
Returns the bottom-left point within the rectangle (width-1, height-1)
| gui_point pntk::gui_rect::get_bottom_right | ( | ) | const |
Returns the bottom-right point within the rectangle (width-1, height-1)
| gui_point pntk::gui_rect::get_center | ( | ) | const |
Returns the center point
| int pntk::gui_rect::get_center_x | ( | ) | const |
Returns the center x value
| int pntk::gui_rect::get_center_y | ( | ) | const |
Returns the center y value
| int pntk::gui_rect::get_height | ( | ) | const |
Returns the height value
| gui_size pntk::gui_rect::get_size | ( | ) | const |
Returns the size of the rectangle
| gui_point pntk::gui_rect::get_top_left | ( | ) | const |
Returns the top-left point within the rectangle (width-1, height-1)
| gui_point pntk::gui_rect::get_top_right | ( | ) | const |
Returns the top-right point within the rectangle (width-1, height-1)
| int pntk::gui_rect::get_width | ( | ) | const |
Returns the width value
| int pntk::gui_rect::get_x | ( | ) | const |
Returns the x value
| int pntk::gui_rect::get_x2 | ( | ) | const |
Returns the width added to the x value
| int pntk::gui_rect::get_y | ( | ) | const |
Returns the y value
| int pntk::gui_rect::get_y2 | ( | ) | const |
Returns the height added to the y value
| bool pntk::gui_rect::intersects | ( | const gui_rect & | rect | ) | const |
Returns true if the rectangles collide.
| bool pntk::gui_rect::operator!= | ( | const gui_rect & | rhs | ) | const |
Returns true if the x, y, width and height of the compared gui_rects are not equal.
| bool pntk::gui_rect::operator== | ( | const gui_rect & | rhs | ) | const |
Returns true if the x, y, width and height of the compared gui_rects are equal.
| void pntk::gui_rect::set | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height | ||
| ) |
Sets the x and the y and the width and height value
| void pntk::gui_rect::set_height | ( | int | height | ) |
Sets the height value
| void pntk::gui_rect::set_position | ( | const gui_point & | point | ) |
Sets the width value
| void pntk::gui_rect::set_size | ( | const gui_size & | size | ) |
Sets the height value
| void pntk::gui_rect::set_width | ( | int | width | ) |
Sets the width value
| void pntk::gui_rect::set_x | ( | int | x | ) |
Sets the x value
| void pntk::gui_rect::set_y | ( | int | y | ) |
Sets the y value
1.8.15