- Main Page
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

# IpeRect Class Reference
[Ipe Geometry]

Axis-parallel rectangle (which can be empty). More...

List of all members.

## Public Member Functions

- IpeRect ()
- IpeRect (const IpeVector &c)
- IpeRect (const IpeVector &c1, const IpeVector &c2)
- int IsEmpty () const
- IpeVector Max () const
- IpeVector Min () const
- IpeVector TopLeft () const
- IpeVector BottomRight () const
- IpeScalar Width () const
- IpeScalar Height () const
- void AddPoint (const IpeVector &rhs)
- void AddRect (const IpeRect &rhs)
- bool Contains (const IpeVector &rhs) const
- bool Contains (const IpeRect &rhs) const
- bool CertainClearance (const IpeVector &v, double bound) const
- bool Intersects (const IpeRect &rhs) const

## Detailed Description

Axis-parallel rectangle (which can be empty).

## Constructor & Destructor Documentation

IpeRect::IpeRect | ( |  | ) | `[inline, explicit]`

Create empty rectangle.

IpeRect::IpeRect | ( | const IpeVector & | c | ) | `[inline, explicit]`

Create rectangle containing just the point c.

IpeRect::IpeRect | ( | const IpeVector & | c1,
|  | const IpeVector & | c2 |
| ) |  |  | `[explicit]`

Create rectangle containing points c1 and c2.

## Member Function Documentation

int IpeRect::IsEmpty | ( |  | ) | const`[inline]`

True if rectangle is empty.

IpeVector IpeRect::Max | ( |  | ) | const`[inline]`

Return top right corner.

IpeVector IpeRect::Min | ( |  | ) | const`[inline]`

Return bottom left corner.

IpeVector IpeRect::TopLeft | ( |  | ) | const`[inline]`

Return top left corner.

IpeVector IpeRect::BottomRight | ( |  | ) | const`[inline]`

Return bottom right corner.

IpeScalar IpeRect::Width | ( |  | ) | const`[inline]`

Return width.

IpeScalar IpeRect::Height | ( |  | ) | const`[inline]`

Return height.

void IpeRect::AddPoint | ( | const IpeVector & | rhs | ) |

Enlarge rectangle to contain point.

void IpeRect::AddRect | ( | const IpeRect & | rhs | ) |

Enlarge rectangle to contain rhs rectangle.

bool IpeRect::Contains | ( | const IpeVector & | rhs | ) | const

Does (closed) rectangle contain the point?

bool IpeRect::Contains | ( | const IpeRect & | rhs | ) | const

Does rectangle contain other rectangle?

bool IpeRect::CertainClearance | ( | const IpeVector & | 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.

bool IpeRect::Intersects | ( | const IpeRect & | rhs | ) | const

Does rectangle intersect other rectangle?

The documentation for this class was generated from the following files:

- ipegeo.h
- ipegeo.cpp