29#include <boost/python.hpp>
30#include <boost/python/implicit.hpp>
39using namespace boost::python;
80 class_<Geom::Rect>(
"Rect", init<Geom::Interval, Geom::Interval>())
81 .def(init<Geom::Point,Geom::Point>())
83 .def(init<Geom::Rect const &>())
85 .def(
"__getitem__", python_getitem<Geom::Rect,Geom::Interval,2>)
3x3 affine transformation matrix.
3x3 matrix representing an affine transformation.
Coord right() const
Return rightmost coordinate of the rectangle (+X is to the right).
Coord area() const
Compute the rectangle's area.
bool contains(GenericRect< C > const &r) const
Check whether the rectangle includes all points in the given rectangle.
bool intersects(GenericRect< C > const &r) const
Check whether the rectangles have any common points.
Coord top() const
Return top coordinate of the rectangle (+Y is downwards).
CPoint midpoint() const
Get the point in the geometric center of the rectangle.
void expandBy(C amount)
Expand the rectangle in both directions by the specified amount.
Coord left() const
Return leftmost coordinate of the rectangle (+X is to the right).
void expandTo(CPoint const &p)
Enlarge the rectangle to contain the given point.
Coord height() const
Get the vertical extent of the rectangle.
void unionWith(CRect const &b)
Enlarge the rectangle to contain the argument.
Coord width() const
Get the horizontal extent of the rectangle.
CPoint min() const
Get the corner of the rectangle with smallest coordinate values.
Coord bottom() const
Return bottom coordinate of the rectangle (+Y is downwards).
Coord maxExtent() const
Get the larger extent (width or height) of the rectangle.
CPoint dimensions() const
Get rectangle's width and height as a point.
CPoint corner(unsigned i) const
Return the n-th corner of the rectangle.
CPoint max() const
Get the corner of the rectangle with largest coordinate values.
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
bool interiorContains(Point const &p) const
Check whether the interior includes the given point.
Lifts one dimensional objects into 2D.
Simple closed interval class.
Coord distanceSq(Point const &p, Rect const &rect)
Angle distance(Angle const &a, Angle const &b)
Rect union_list(std::vector< Rect > const &r)
Union a list of rectangles.
static void wrap_unionWith(Geom::Rect &x, Geom::Rect const &y)
static void wrap_expandBy(Geom::Rect &x, double val)
static bool wrap_interiorContains_coord(Geom::Rect const &x, Geom::Point val)
static bool wrap_contains_ivl(Geom::Rect const &x, Geom::Rect val)
static bool wrap_interiorContains_ivl(Geom::Rect const &x, Geom::Rect val)
static bool wrap_intersects(Geom::Rect const &x, Geom::Rect const &y)
static bool wrap_contains_coord(Geom::Rect const &x, Geom::Point val)
static void wrap_expandBy_pt(Geom::Rect &x, Geom::Point val)