159 left = std::max(left,
other.left);
160 top = std::max(top,
other.top);
161 right = std::min(right,
other.right);
162 bottom = std::min(bottom,
other.bottom);
175 if (!
other.IsNull()) {
179 left = std::min(left,
other.left);
180 top = std::min(top,
other.top);
181 right = std::max(right,
other.right);
182 bottom = std::max(bottom,
other.bottom);
209 if (
other.top > top) {
210 result[
i].left = left;
212 result[
i].right = right;
213 result[
i].bottom =
other.top;
219 if (
other.bottom < bottom) {
220 result[
i].left = left;
221 result[
i].top =
other.bottom;
222 result[
i].right = right;
223 result[
i].bottom = bottom;
229 if (
other.left > left) {
230 result[
i].left = left;
231 result[
i].top = std::max(top,
other.top);
232 result[
i].right =
other.left;
233 result[
i].bottom = std::min(bottom,
other.bottom);
239 if (
other.right < right) {
240 result[
i].left =
other.right;
241 result[
i].top = std::max(top,
other.top);
242 result[
i].right = right;
243 result[
i].bottom = std::min(bottom,
other.bottom);
int Magnitude() const
Returns the distance between the origin and the point.
TPoint()
Constructs an uninitialized point.
TRect is a mathematical class derived from tagRect.
TRect & operator|=(const TRect &other)
Changes this rectangle to its union with the other rectangle.
bool IsNull() const
Returns true if left, right, top, and bottom are all 0; otherwise, returns false.
TRect & Offset(int dx, int dy)
Changes this rectangle so its corners are offset by the given delta values.
int Subtract(const TRect &other, TRect result[]) const
Determines the parts of this rect that do not lie within "other" region.
TRect & Inflate(int dx, int dy)
Inflates a rectangle inflated by the given delta arguments.
bool Touches(const TRect &other) const
Returns true if the other rectangle shares any interior points with this rectangle; otherwise,...
void SetNull()
Sets the left, top, right, and bottom of the rectangle to 0.
TRect & DeflateRect(int dx, int dy)
TRect & operator&=(const TRect &other)
Changes this rectangle to its intersection with the other rectangle.
TRect & Normalize()
Normalizes this rectangle by switching the left and right data member values if left > right,...
int Magnitude() const
Returns the length of the diagonal of the rectangle represented by this object.
Classes for window system geometry.
Object Windows Library (OWLNext Core)
General definitions used by all ObjectWindows programs.