64
60
// Horizontal concatenation
65
BoxExtend operator & (const BoxExtend& e)
61
BoxExtend operator & (const BoxExtend& e) const
67
if (isValid() && e.isValid())
68
return BoxExtend(point[X] + e.point[X],
69
min(point[Y],e.point[Y]));
64
(isValid() && e.isValid())
65
? BoxExtend(point[X] + e.point[X],
66
min(point[Y],e.point[Y]))
74
70
// Vertical concatenation
75
BoxExtend operator | (const BoxExtend& e)
71
BoxExtend operator | (const BoxExtend& e) const
77
if (isValid() && e.isValid())
78
return BoxExtend(min(point[X], e.point[X]),
79
point[Y] + e.point[Y]);
74
(isValid() && e.isValid())
75
? BoxExtend(min(point[X], e.point[X]),
76
point[Y] + e.point[Y])
84
80
// Stacked concatenation
85
BoxExtend operator ^ (const BoxExtend& e)
81
BoxExtend operator ^ (const BoxExtend& e) const
87
if (isValid() && e.isValid())
88
return BoxExtend(max(point[X], e.point[X]),
89
max(point[Y], e.point[Y]));
84
(isValid() && e.isValid())
85
? BoxExtend(max(point[X], e.point[X]),
86
max(point[Y], e.point[Y]))
94
90
// Assignment versions
95
void operator &= (const BoxExtend& e)
91
void operator &= (const BoxExtend& e)
97
93
if (isValid() && e.isValid())
129
inline ostream& operator << (ostream& stream, const BoxExtend& extend)
125
inline std::ostream& operator << (std::ostream& stream, const BoxExtend& extend)
131
127
const BoxPoint& p = extend;
132
128
return operator << (stream, p);