26 CRect(
int left,
int top,
int right,
int bottom);
189 static CRect s_empty;
190 static CRect s_invalid;
380 return m_horizontalRange;
386 return m_horizontalRange;
392 m_horizontalRange = range;
398 return m_verticalRange;
404 return m_verticalRange;
410 m_verticalRange = range;
424 return (m_horizontalRange.
IsValid()) && (m_verticalRange.
IsValid());
430 return (m_horizontalRange.
IsEmpty()) || (m_verticalRange.
IsEmpty());
469 return m_horizontalRange.
Contains(rect.m_horizontalRange) && m_verticalRange.
Contains(rect.m_verticalRange);
483 return m_horizontalRange.
IsOutsideOf(rect.m_horizontalRange) || m_verticalRange.
IsOutsideOf(rect.m_verticalRange);
490 m_horizontalRange.
Reset();
491 m_verticalRange.
Reset();
504 m_horizontalRange.
Unite(rect.m_horizontalRange);
505 m_verticalRange.
Unite(rect.m_verticalRange);
521 result.m_horizontalRange.
Unite(rect.m_horizontalRange);
522 result.m_verticalRange.
Unite(rect.m_verticalRange);
561 CRect result = *
this;
574 m_horizontalRange.
Expand(rect.m_horizontalRange);
575 m_verticalRange.
Expand(rect.m_verticalRange);
584 CRect result = *
this;
611 CRect result = *
this;
632 CRect result = *
this;
642 m_horizontalRange = rect.m_horizontalRange;
643 m_verticalRange = rect.m_verticalRange;
651 return (m_horizontalRange == rect.m_horizontalRange) && (m_verticalRange == rect.m_verticalRange);
Simple rectangle with integer bounds.
ibase::CSize GetSize() const
Get size of rectangle.
static const i2d::CRect & GetInvalid()
Get invalid rectangle.
istd::CIndex2d GetLeftTop() const
void SetLeftTop(istd::CIndex2d position)
void SetHorizontalRange(const istd::CIntRange &range)
void Expand(const CRect &rect)
Expand rectangle using second rectangle.
void SetRightTop(istd::CIndex2d position)
istd::CIndex2d GetLeftBottom() const
static const i2d::CRect & GetEmpty()
Get empty rectangle with all values set to 0.
void Intersection(const CRect &rect)
Calculate intersection of this and second rectangle and stores result in this object.
bool IsNull() const
Check if all parameters are 0.
void Translate(istd::CIndex2d point)
Move rectangle.
void SetRightBottom(istd::CIndex2d position)
bool operator==(const CRect &rect) const
void Union(const CRect &rect)
Calculate union of this and second rectangle and stores result in this object.
void SetLeftBottom(istd::CIndex2d position)
void SetBottom(int bottom)
istd::CIndex2d GetCenter() const
CRect GetExpanded(const CRect &rect) const
Get expanded rectangle.
istd::CIntRange & GetHorizontalRangeRef()
bool IsInside(const istd::CIndex2d &point) const
Check if specified point lies inside.
CRect GetTranslated(istd::CIndex2d point) const
Get moved rectangle.
const istd::CIntRange & GetHorizontalRange() const
CRect GetIntersection(const CRect &rect) const
Get intersection of two rectangles.
CRect & operator=(const CRect &rect)
void SetVerticalRange(const istd::CIntRange &range)
istd::CIndex2d GetRightBottom() const
void GetUnion(const CRect &rect, CRect &result) const
Get union of two rectangles.
bool operator!=(const CRect &rect) const
istd::CIntRange & GetVerticalRangeRef()
bool IsEmpty() const
Check if rectangle is empty.
const istd::CIntRange & GetVerticalRange() const
bool IsValid() const
Check if rectangle is valid.
i2d::CRectangle GetRectangle() const
void Reset()
Set all members to 0.
bool IsOutside(const CRect &rect) const
Check if specified rectangle lies fully outside.
istd::CIndex2d GetRightTop() const
bool IsValidNonEmpty() const
Return true if the rectangle is valid and it is not empty.
Definition of rectangle area orthogonal to axis of coordination system.
double GetTop() const
Get value of top boundary.
double GetLeft() const
Get value of left boundary.
double GetBottom() const
Get value of bottom boundary.
double GetRight() const
Get value of right boundary.
Definition of simple 2D size based on integer values.
Index implementation for addressing elements in 2D-space.
bool IsOutsideOf(const TRange &range) const
Check if this range is outside of the given range.
ValueType GetLength() const
Get length of this range.
void Unite(const TRange &range)
Set this range to be union of two ranges.
void Reset()
Set this range to be empty.
static const TRange & GetInvalid()
Return invalid range.
void SetMinValue(ValueType minValue)
Set the bottom value.
ValueType GetMaxValue() const
Get the top value.
bool Contains(ValueType value) const
Returns true, if value is in range between top and bottom.
void Expand(const TRange &range)
Set this range to be expanded.
void Intersection(const TRange &range)
Set this range to be intersection of two ranges.
ValueType GetMinValue() const
Get the bottom value.
bool IsEmpty() const
Return true if the bottom value is equal to the top value.
static const TRange & GetNull()
Return null range.
bool IsValidNonEmpty() const
Return true if the range is valid and it is not empty.
bool IsValid() const
Return true if the bottom value is smaller or equal then the top value.
void SetMaxValue(ValueType maxValue)
Set the top value.
istd::TRange< int > CIntRange