Rhino C++ API
8.14
|
#include <opennurbs_ipoint.h>
Public Member Functions | |
ON_4iRect ()=default | |
ON_4iRect (const ON_2iPoint &point, const ON_2iSize &size) | |
ON_4iRect (const ON_2iPoint topLeft, const ON_2iPoint &bottomRight) | |
ON_4iRect (const ON_4iRect &)=default | |
ON_4iRect (int left, int top, int right, int bottom) | |
~ON_4iRect ()=default | |
const ON_2iPoint | BottomRight (void) const |
const ON_2iPoint | CenterPoint (void) const |
void | DeflateRect (int, int) |
int | Height (void) const |
void | InflateRect (int, int) |
void | InflateRect (int, int, int, int) |
bool | IntersectRect (const ON_4iRect &r1, const ON_4iRect &r2) |
bool | IntersectRect (const ON_4iRect *r1, const ON_4iRect *r2) |
bool | IsRectEmpty (void) const |
bool | IsRectNull (void) const |
bool | IsSet () const |
bool | IsZero () const |
void | NormalizeRect () |
void | OffsetRect (const ON_2iVector &) |
void | OffsetRect (int, int) |
ON_4iRect & | operator= (const ON_4iRect &)=default |
bool | PtInRect (const ON_2iPoint &pt) const |
void | SetRect (int l, int t, int r, int b) |
void | SetRectEmpty (void) |
void | SetZero () |
const ON_2iSize | Size (void) const |
bool | SubtractRect (const ON_4iRect *rect1, const ON_4iRect *rect2) |
const ON_2iPoint | TopLeft (void) const |
int | Width (void) const |
Public Attributes | |
ON__INT32 | bottom |
ON__INT32 | left |
ON__INT32 | right |
ON__INT32 | top |
Static Public Attributes | |
static const ON_4iRect | Unset |
(ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX) More... | |
static const ON_4iRect | Zero |
(0,0,0,0) More... | |
Class ON_4iRect For those situations where a Windows SDK RECT or MFC CRect value needs to be used in code that does not link with MFC. If you want a traditional bounding box, use ON_2dBoundingBox.
|
default |
Default construction intentionally leaves x and y uninitialized. Use something like ON_4iRect pt(1,2,3,4); or ON_4iRect pt = ON_4iRect::Zero; when you need an initialized ON_4iRect.
|
default |
|
default |
ON_4iRect::ON_4iRect | ( | int | left, |
int | top, | ||
int | right, | ||
int | bottom | ||
) |
ON_4iRect::ON_4iRect | ( | const ON_2iPoint | topLeft, |
const ON_2iPoint & | bottomRight | ||
) |
ON_4iRect::ON_4iRect | ( | const ON_2iPoint & | point, |
const ON_2iSize & | size | ||
) |
const ON_2iPoint ON_4iRect::BottomRight | ( | void | ) | const |
const ON_2iPoint ON_4iRect::CenterPoint | ( | void | ) | const |
void ON_4iRect::DeflateRect | ( | int | , |
int | |||
) |
int ON_4iRect::Height | ( | void | ) | const |
void ON_4iRect::InflateRect | ( | int | , |
int | |||
) |
void ON_4iRect::InflateRect | ( | int | , |
int | , | ||
int | , | ||
int | |||
) |
bool ON_4iRect::IsRectEmpty | ( | void | ) | const |
bool ON_4iRect::IsRectNull | ( | void | ) | const |
bool ON_4iRect::IsSet | ( | ) | const |
Returns: true if none of left, top, right, or bottom is set to ON_UNSET_INT_INDEX
bool ON_4iRect::IsZero | ( | ) | const |
Returns: true if all of left, top, right, and bottom are set to 0.
void ON_4iRect::NormalizeRect | ( | ) |
void ON_4iRect::OffsetRect | ( | const ON_2iVector & | ) |
void ON_4iRect::OffsetRect | ( | int | , |
int | |||
) |
bool ON_4iRect::PtInRect | ( | const ON_2iPoint & | pt | ) | const |
void ON_4iRect::SetRect | ( | int | l, |
int | t, | ||
int | r, | ||
int | b | ||
) |
|
inline |
void ON_4iRect::SetZero | ( | ) |
const ON_2iSize ON_4iRect::Size | ( | void | ) | const |
const ON_2iPoint ON_4iRect::TopLeft | ( | void | ) | const |
int ON_4iRect::Width | ( | void | ) | const |
ON__INT32 ON_4iRect::bottom |
ON__INT32 ON_4iRect::left |
NOTE WELL: Windows 2d integer device coordinates have a strong y-down bias and it is common for top < bottom. General 2d bounding boxes have a strong lower < upper / min < max bias. Take care when converting between ON_2iBoundingBox and ON_4iRect. It is intentional that no automatic conversion between bounding box and ON_4iRect is supplied because each case must be carefully considered.
ON__INT32 ON_4iRect::right |
ON__INT32 ON_4iRect::top |
|
static |
(ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX)
|
static |
(0,0,0,0)