![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Simple rectangle with integer bounds. More...
#include <CRect.h>
Public Member Functions | |
CRect () | |
CRect (const CRect &rect) | |
CRect (int left, int top, int right, int bottom) | |
CRect (const istd::CIndex2d &leftTop, const istd::CIndex2d &rightBottom) | |
CRect (const istd::CIndex2d &leftTop, const ibase::CSize &size) | |
CRect (const i2d::CRectangle &rect) | |
CRect (const ibase::CSize &size) | |
i2d::CRectangle | GetRectangle () const |
istd::CIndex2d | GetLeftTop () const |
void | SetLeftTop (istd::CIndex2d position) |
istd::CIndex2d | GetRightTop () const |
void | SetRightTop (istd::CIndex2d position) |
istd::CIndex2d | GetLeftBottom () const |
void | SetLeftBottom (istd::CIndex2d position) |
istd::CIndex2d | GetRightBottom () const |
void | SetRightBottom (istd::CIndex2d position) |
int | GetLeft () const |
void | SetLeft (int left) |
int | GetTop () const |
void | SetTop (int top) |
int | GetRight () const |
void | SetRight (int right) |
int | GetBottom () const |
void | SetBottom (int bottom) |
int | GetWidth () const |
int | GetHeight () const |
const istd::CIntRange & | GetHorizontalRange () const |
istd::CIntRange & | GetHorizontalRangeRef () |
void | SetHorizontalRange (const istd::CIntRange &range) |
const istd::CIntRange & | GetVerticalRange () const |
istd::CIntRange & | GetVerticalRangeRef () |
void | SetVerticalRange (const istd::CIntRange &range) |
istd::CIndex2d | GetCenter () const |
bool | IsValid () const |
Check if rectangle is valid. | |
bool | IsEmpty () const |
Check if rectangle is empty. | |
bool | IsValidNonEmpty () const |
Return true if the rectangle is valid and it is not empty. | |
bool | IsNull () const |
Check if all parameters are 0. | |
ibase::CSize | GetSize () const |
Get size of rectangle. | |
bool | IsInside (const istd::CIndex2d &point) const |
Check if specified point lies inside. | |
bool | IsInside (const CRect &rect) const |
Check if specified rectangle lies inside. | |
bool | IsOutside (const CRect &rect) const |
Check if specified rectangle lies fully outside. | |
void | Reset () |
Set all members to 0. | |
void | Union (const CRect &rect) |
Calculate union of this and second rectangle and stores result in this object. | |
void | GetUnion (const CRect &rect, CRect &result) const |
Get union of two rectangles. | |
CRect | GetUnion (const CRect &rect) const |
Get union of two rectangles. | |
void | Union (istd::CIndex2d point) |
Calculate union of this rectangle and point. | |
CRect | GetUnion (istd::CIndex2d point) const |
Get union of this rectangle and point. | |
void | Expand (const CRect &rect) |
Expand rectangle using second rectangle. | |
CRect | GetExpanded (const CRect &rect) const |
Get expanded rectangle. | |
void | Intersection (const CRect &rect) |
Calculate intersection of this and second rectangle and stores result in this object. | |
CRect | GetIntersection (const CRect &rect) const |
Get intersection of two rectangles. | |
void | Translate (istd::CIndex2d point) |
Move rectangle. | |
CRect | GetTranslated (istd::CIndex2d point) const |
Get moved rectangle. | |
CRect & | operator= (const CRect &rect) |
bool | operator== (const CRect &rect) const |
bool | operator!= (const CRect &rect) const |
Static Public Member Functions | |
static const i2d::CRect & | GetEmpty () |
Get empty rectangle with all values set to 0. | |
static const i2d::CRect & | GetInvalid () |
Get invalid rectangle. | |
|
inline |
Definition at line 200 of file CRect.h.
References istd::TRange< int >::GetInvalid().
|
inline |
|
inline |
Definition at line 225 of file CRect.h.
References istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and IsValid().
|
inline |
Definition at line 234 of file CRect.h.
References istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and IsValid().
|
inline |
Definition at line 243 of file CRect.h.
References i2d::CRectangle::GetBottom(), i2d::CRectangle::GetLeft(), i2d::CRectangle::GetRight(), i2d::CRectangle::GetTop(), and IsValid().
|
inlineexplicit |
Definition at line 252 of file CRect.h.
References istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and IsValid().
|
inline |
Expand rectangle using second rectangle.
Expanded rectangle is easy sum of coordinates of both rectangles.
Definition at line 573 of file CRect.h.
References istd::TRange< ValueType >::Expand(), and IsValid().
Referenced by GetExpanded().
|
inline |
Definition at line 358 of file CRect.h.
References istd::TRange< ValueType >::GetMaxValue().
Referenced by Union().
|
inline |
Definition at line 418 of file CRect.h.
References istd::TRange< ValueType >::GetLength(), and istd::TRange< ValueType >::GetMinValue().
|
inlinestatic |
|
inline |
Definition at line 376 of file CRect.h.
References istd::TRange< ValueType >::GetLength().
|
inline |
|
inline |
Get intersection of two rectangles.
Definition at line 610 of file CRect.h.
References Intersection(), and IsValid().
|
inlinestatic |
|
inline |
Definition at line 323 of file CRect.h.
References istd::TRange< ValueType >::GetMinValue().
Referenced by iimg::CScanlineMask::CalculateMaskFromBitmap(), and Union().
|
inline |
Definition at line 297 of file CRect.h.
References istd::TRange< ValueType >::GetMaxValue(), and istd::TRange< ValueType >::GetMinValue().
|
inline |
Definition at line 271 of file CRect.h.
References istd::TRange< ValueType >::GetMinValue().
|
inline |
Definition at line 261 of file CRect.h.
References istd::TRange< ValueType >::GetLength(), and istd::TRange< ValueType >::GetMinValue().
|
inline |
Definition at line 346 of file CRect.h.
References istd::TRange< ValueType >::GetMaxValue().
Referenced by iimg::CScanlineMask::CalculateMaskFromBitmap(), and Union().
|
inline |
Definition at line 310 of file CRect.h.
References istd::TRange< ValueType >::GetMaxValue().
|
inline |
Definition at line 284 of file CRect.h.
References istd::TRange< ValueType >::GetMaxValue(), and istd::TRange< ValueType >::GetMinValue().
|
inline |
Get size of rectangle.
Definition at line 450 of file CRect.h.
References istd::TRange< ValueType >::GetLength().
Referenced by iimg::CBitmapSlice::GetImageSize().
|
inline |
Definition at line 334 of file CRect.h.
References istd::TRange< ValueType >::GetMinValue().
Referenced by Union().
|
inline |
Get union of two rectangles.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 534 of file CRect.h.
References GetUnion(), and IsValid().
Get union of two rectangles.
Definition at line 514 of file CRect.h.
References IsEmpty(), IsValid(), Reset(), and istd::TRange< ValueType >::Unite().
Referenced by GetUnion().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 370 of file CRect.h.
References istd::TRange< ValueType >::GetLength().
|
inline |
Calculate intersection of this and second rectangle and stores result in this object.
Definition at line 596 of file CRect.h.
References istd::TRange< ValueType >::Intersection(), IsValid(), istd::TRange< ValueType >::IsValid(), and Reset().
Referenced by GetIntersection().
|
inline |
Check if rectangle is empty.
Definition at line 432 of file CRect.h.
References istd::TRange< ValueType >::IsEmpty().
Referenced by GetUnion(), IsInside(), IsOutside(), and Union().
|
inline |
Check if specified rectangle lies inside.
Definition at line 464 of file CRect.h.
References istd::TRange< ValueType >::Contains(), IsEmpty(), and IsValid().
|
inline |
Check if specified point lies inside.
Definition at line 456 of file CRect.h.
References istd::TRange< ValueType >::Contains(), istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and IsValid().
|
inline |
Check if all parameters are 0.
Definition at line 444 of file CRect.h.
References istd::TRange< int >::GetNull().
|
inline |
Check if specified rectangle lies fully outside.
Definition at line 478 of file CRect.h.
References IsEmpty(), istd::TRange< ValueType >::IsOutsideOf(), and IsValid().
|
inline |
Check if rectangle is valid.
Definition at line 426 of file CRect.h.
References istd::TRange< ValueType >::IsValid().
Referenced by CRect(), CRect(), CRect(), CRect(), CRect(), Expand(), GetExpanded(), GetIntersection(), GetTranslated(), GetUnion(), GetUnion(), GetUnion(), Intersection(), IsInside(), IsInside(), IsOutside(), Union(), and Union().
|
inline |
Return true
if the rectangle is valid and it is not empty.
Definition at line 438 of file CRect.h.
References istd::TRange< ValueType >::IsValidNonEmpty().
|
inline |
Definition at line 659 of file CRect.h.
References operator==().
|
inline |
Definition at line 653 of file CRect.h.
Referenced by operator!=().
|
inline |
Set all members to 0.
Definition at line 492 of file CRect.h.
References istd::TRange< ValueType >::Reset().
Referenced by GetUnion(), Intersection(), and iview::CViewBase::ResetInvalidatedBox().
|
inline |
Definition at line 364 of file CRect.h.
References istd::TRange< ValueType >::SetMaxValue().
|
inline |
|
inline |
Definition at line 328 of file CRect.h.
References istd::TRange< ValueType >::SetMinValue().
|
inline |
Definition at line 303 of file CRect.h.
References istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), istd::TRange< ValueType >::SetMaxValue(), and istd::TRange< ValueType >::SetMinValue().
|
inline |
Definition at line 277 of file CRect.h.
References istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and istd::TRange< ValueType >::SetMinValue().
|
inline |
Definition at line 352 of file CRect.h.
References istd::TRange< ValueType >::SetMaxValue().
|
inline |
Definition at line 316 of file CRect.h.
References istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and istd::TRange< ValueType >::SetMaxValue().
|
inline |
Definition at line 290 of file CRect.h.
References istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), istd::TRange< ValueType >::SetMaxValue(), and istd::TRange< ValueType >::SetMinValue().
|
inline |
Definition at line 340 of file CRect.h.
References istd::TRange< ValueType >::SetMinValue().
|
inline |
|
inline |
Move rectangle.
Definition at line 623 of file CRect.h.
References istd::TRange< ValueType >::GetMaxValue(), istd::TRange< ValueType >::GetMinValue(), istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), istd::TRange< ValueType >::SetMaxValue(), and istd::TRange< ValueType >::SetMinValue().
Referenced by GetTranslated().
|
inline |
Calculate union of this and second rectangle and stores result in this object.
Definition at line 499 of file CRect.h.
References IsEmpty(), IsValid(), and istd::TRange< ValueType >::Unite().
Referenced by GetUnion(), and iview::CViewBase::InvalidateBox().
|
inline |
Calculate union of this rectangle and point.
Result is stored in this object.
Definition at line 547 of file CRect.h.
References GetBottom(), GetLeft(), GetRight(), GetTop(), istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and IsValid().
© Witold Gantzke and Kirill Lepskiy