| Ipelib
    | 
#include <ipegeo.h>
| Public Member Functions | |
| Rect () | |
| Rect (const Vector &c) | |
| Rect (const Vector &c1, const Vector &c2) | |
| void | clear () | 
| int | isEmpty () const | 
| double | left () const | 
| double | right () const | 
| double | bottom () const | 
| double | top () const | 
| Vector | topRight () const | 
| Vector | bottomLeft () const | 
| Vector | topLeft () const | 
| Vector | bottomRight () const | 
| Vector | center () const | 
| double | width () const | 
| double | height () const | 
| void | addPoint (const Vector &rhs) | 
| void | addRect (const Rect &rhs) | 
| void | clipTo (const Rect &rhs) | 
| bool | contains (const Vector &rhs) const | 
| bool | contains (const Rect &rhs) const | 
| bool | certainClearance (const Vector &v, double bound) const | 
| bool | intersects (const Rect &rhs) const | 
| Related Functions | |
| (Note that these are not member functions.) | |
| Stream & | operator<< (Stream &stream, const Rect &rhs) | 
Axis-parallel rectangle (which can be empty)
| 
 | inlineexplicit | 
Create empty rectangle.
Referenced by ipe::Vector::snap().
| 
 | inlineexplicit | 
Create rectangle containing just the point c.
Create rectangle containing points c1 and c2.
| 
 | inline | 
Make rectangle empty.
Referenced by ipe::BBoxPainter::doNewPath().
| 
 | inline | 
True if rectangle is empty.
Referenced by addRect(), clipTo(), contains(), ipe::PdfWriter::createPageView(), ipe::BBoxPainter::doDrawPath(), and intersects().
| 
 | inline | 
Return left side.
| 
 | inline | 
Return right side.
| 
 | inline | 
Return bottom side.
| 
 | inline | 
Return top side.
| 
 | inline | 
Return top right corner.
Referenced by ipe::Image::addToBBox(), ipe::Bezier::bbox(), certainClearance(), ipe::Image::distance(), ipe::BBoxPainter::doCurveTo(), ipe::BBoxPainter::doDrawPath(), ipe::BBoxPainter::doDrawText(), ipe::Painter::rect(), ipe::Shape::Shape(), ipe::Image::snapCtl(), ipe::CanvasBase::snapToPaperAndFrame(), and ipe::TransformTool::TransformTool().
| 
 | inline | 
Return bottom left corner.
Referenced by ipe::Image::addToBBox(), ipe::Bezier::bbox(), certainClearance(), ipe::Latex::createLatexSource(), ipe::Image::distance(), ipe::BBoxPainter::doCurveTo(), ipe::BBoxPainter::doDrawPath(), ipe::BBoxPainter::doDrawText(), ipe::Image::draw(), ipe::Painter::rect(), ipe::Shape::Shape(), ipe::Image::snapCtl(), ipe::CanvasBase::snapToPaperAndFrame(), and ipe::TransformTool::TransformTool().
| 
 | inline | 
Return top left corner.
Referenced by ipe::Image::addToBBox(), ipe::Image::distance(), ipe::Painter::rect(), ipe::Thumbnail::render(), ipe::Thumbnail::saveRender(), ipe::Shape::Shape(), ipe::Image::snapCtl(), and ipe::CanvasBase::snapToPaperAndFrame().
| 
 | inline | 
Return bottom right corner.
Referenced by ipe::Image::addToBBox(), ipe::Image::distance(), ipe::Painter::rect(), ipe::Shape::Shape(), ipe::Image::snapCtl(), and ipe::CanvasBase::snapToPaperAndFrame().
| 
 | inline | 
Return center of rectangle.
Referenced by ipe::Group::draw().
| 
 | inline | 
Return width.
Referenced by ipe::Image::draw(), ipe::Group::draw(), ipe::Thumbnail::saveRender(), ipe::Text::setXForm(), and ipe::Thumbnail::Thumbnail().
| 
 | inline | 
Return height.
Referenced by ipe::Image::draw(), ipe::Group::draw(), ipe::Thumbnail::saveRender(), ipe::Text::setXForm(), and ipe::Thumbnail::Thumbnail().
| void Rect::addPoint | ( | const Vector & | rhs | ) | 
Enlarge rectangle to contain point.
References ipe::Vector::x, and ipe::Vector::y.
Referenced by ipe::Image::addToBBox(), ipe::Reference::addToBBox(), ipe::Text::addToBBox(), ipe::CurveSegment::addToBBox(), ipe::ClosedSpline::addToBBox(), ipe::Bezier::bbox(), ipe::Arc::bbox(), ipe::Latex::createLatexSource(), ipe::Image::distance(), ipe::Bezier::distance(), ipe::BBoxPainter::doCurveTo(), ipe::BBoxPainter::doDrawBitmap(), ipe::BBoxPainter::doDrawPath(), ipe::BBoxPainter::doDrawText(), ipe::BBoxPainter::doLineTo(), ipe::BBoxPainter::doMoveTo(), ipe::Image::Image(), ipe::Arc::intersect(), and ipe::Bezier::snap().
| void Rect::addRect | ( | const Rect & | rhs | ) | 
Enlarge rectangle to contain rhs rectangle.
Does nothing if rhs is empty.
References isEmpty(), ipe::Vector::x, and ipe::Vector::y.
Referenced by ipe::CurveSegment::addToBBox(), ipe::Group::addToBBox(), ipe::Ellipse::addToBBox(), ipe::ClosedSpline::addToBBox(), ipe::BBoxPainter::doDrawBitmap(), ipe::BBoxPainter::doDrawText(), and ipe::TransformTool::TransformTool().
| void Rect::clipTo | ( | const Rect & | cbox | ) | 
Clip rectangle to fit inside cbox.
Does nothing if either rectangle is empty.
References isEmpty(), ipe::Vector::x, and ipe::Vector::y.
Referenced by ipe::Group::addToBBox(), ipe::BBoxPainter::doDrawBitmap(), ipe::BBoxPainter::doDrawPath(), and ipe::BBoxPainter::doDrawText().
| bool Rect::contains | ( | const Vector & | rhs | ) | const | 
Does (closed) rectangle contain the point?
References ipe::Vector::x, and ipe::Vector::y.
Referenced by ipe::SelectTool::mouseButton().
| bool Rect::contains | ( | const Rect & | rhs | ) | const | 
Does rectangle contain other rectangle?
References isEmpty(), ipe::Vector::x, and ipe::Vector::y.
| bool Rect::certainClearance | ( | const Vector & | v, | 
| double | bound | ||
| ) | const | 
Returns false if the distance between the box and v is smaller than bound. Often returns true if their distance is larger than bound.
References bottomLeft(), topRight(), ipe::Vector::x, and ipe::Vector::y.
Referenced by ipe::Image::distance(), ipe::Bezier::distance(), and ipe::Bezier::snap().
| bool Rect::intersects | ( | const Rect & | rhs | ) | const | 
Does rectangle intersect other rectangle?
References isEmpty(), ipe::Vector::x, and ipe::Vector::y.
Referenced by ipe::SelectTool::mouseButton(), and ipe::Bezier::snap().