Go to the documentation of this file.
73 Point topRight()
const {
return Point(
left +
width,
top); }
74 Point bottomLeft()
const {
return Point(
left,
top -
height); }
77 Point centerLeft()
const {
return Point(
left,
top -
height / 2.0); }
79 Point centerTop()
const {
return Point(
left +
width / 2.0,
top); }
81 double bottom()
const {
return top -
height; }
82 double right()
const {
return left +
width; }
84 void growToContain(
const Point &);
85 void growToContain(
const std::vector<Point> & points);
86 bool contains(Point)
const;
87 bool strictlyContains(Point)
const;
88 bool intersects(
const Rect &)
const;
89 bool strictlyIntersects(
const Rect &)
const;
90 Rect & grow(
double margin);
91 inline bool isNull()
const;
102 Rect
operator||(
const Rect & rectA,
const Rect & rectB);
112 Rect
operator&&(
const Rect & rectA,
const Rect & rectB);
131 bool Rect::isNull()
const
138 #endif // BOARD_RECT_H
The Point structure. @copyright This source code is part of the Board project, a C++ library whose pu...
Rect operator||(const Rect &rectA, const Rect &rectB)
Definition: Rect.cpp:32
double top
Definition: Rect.h:41
Struct representing a rectangle on the plane.
Definition: Rect.h:39
Rect(Point topLeft, Point bottomRight)
Definition: Rect.h:70
Struct representing a 2D point.
Definition: Point.h:42
double left
Definition: Rect.h:40
Rect(double left=0.0, double top=0.0, double width=0.0, double height=0.0)
Definition: Rect.h:53
Rect(Point topLeft, double width=0.0, double height=0.0)
Definition: Rect.h:62
double width
Definition: Rect.h:42
Rect operator&&(const Rect &rectA, const Rect &rectB)
Definition: Rect.cpp:57
std::ostream & operator<<(std::ostream &out, const LibBoard::Rect &rect)
Definition: Rect.cpp:135
double height
Definition: Rect.h:43