Prev: stdwinevents Up: STDWIN ONLY Top: Top
rect
stdwin
:
a pair of points, where a point is a pair of integers.
For example, the rectangle
(10, 20), (90, 80)
stdwin
).
The module defines the following objects:
>>> import rect
>>> r1 = (10, 20), (90, 80)
>>> r2 = (0, 0), (10, 20)
>>> r3 = rect.intersect([r1, r2])
>>> if r3 is rect.empty: print 'Empty intersection'
Empty intersection
>>>
(left, top), (right, bottom)
is empty if
left >= right
or top => bottom
.
rect.error
if the list is empty.
Returns
rect.empty
if the intersection of the rectangles is empty.
rect.empty
if the list is empty or all its rectangles are empty.
(h, v)
is inside a rectangle
(left, top), (right, bottom)
if
left <= h < right
and
top <= v < bottom
.
rect
argument by
dh
pixels horizontally
and
dv
pixels
vertically.
If
dh
or
dv
is negative, the result lies outside
rect.
(left, top), (width, height)
.
(left, top), (right, bottom)
.