Board
0.9.5
|
Struct representing a rectangle on the plane. More...
#include <Rect.h>
Public Member Functions | |
Rect (double left=0.0, double top=0.0, double width=0.0, double height=0.0) | |
Rect (Point topLeft, double width=0.0, double height=0.0) | |
Rect (Point topLeft, Point bottomRight) | |
Point | topLeft () const |
Point | topRight () const |
Point | bottomLeft () const |
Point | bottomRight () const |
Point | center () const |
Point | centerLeft () const |
Point | centerRight () const |
Point | centerTop () const |
Point | centerBottom () const |
double | bottom () const |
double | right () const |
void | clear () |
void | growToContain (const Point &) |
void | growToContain (const std::vector< Point > &points) |
bool | contains (Point) const |
bool | strictlyContains (Point) const |
bool | intersects (const Rect &) const |
bool | strictlyIntersects (const Rect &) const |
Rect & | grow (double margin) |
bool | isNull () const |
Public Attributes | |
double | left |
double | top |
double | width |
double | height |
Struct representing a rectangle on the plane.
The Rectangle structure.
|
inline |
Rect constructor.
left | |
top | |
width | |
height |
|
inline |
Rect constructor.
topLeft | The top-left point of the rectangle. |
width | |
height |
Rect constructor.
topLeft | The top-left point of the rectangle. |
bottomRight | The bottom-right point of the rectangle. |
double LibBoard::Rect::height |
Height of the rectangle.
Referenced by LibBoard::ShapeList::addTiling(), LibBoard::ShapeList::append(), LibBoard::Board::fillRectangle(), LibBoard::operator&&(), operator<<(), LibBoard::operator||(), LibBoard::Shape::resize(), LibBoard::Shape::scaleToHeight(), and LibBoard::Board::setClippingRectangle().
double LibBoard::Rect::left |
Coordinate of the left side.
Referenced by LibBoard::ShapeList::addTiling(), LibBoard::ShapeList::append(), LibBoard::Board::fillRectangle(), LibBoard::operator&&(), operator<<(), LibBoard::operator||(), and LibBoard::Board::setClippingRectangle().
double LibBoard::Rect::top |
Coordinate of the upper side.
Referenced by LibBoard::ShapeList::addTiling(), LibBoard::ShapeList::append(), LibBoard::Board::fillRectangle(), LibBoard::operator&&(), operator<<(), LibBoard::operator||(), and LibBoard::Board::setClippingRectangle().
double LibBoard::Rect::width |
Width of the rectangle.
Referenced by LibBoard::ShapeList::addTiling(), LibBoard::ShapeList::append(), LibBoard::Board::fillRectangle(), LibBoard::operator&&(), operator<<(), LibBoard::operator||(), LibBoard::Shape::resize(), LibBoard::Shape::scaleToWidth(), and LibBoard::Board::setClippingRectangle().