A polygon is the most general case of a box. It is an instance of the
class polygon. The constructor takes a list of points (which
are (x, y) tuples) in the keyword argument corners and
optionally another (x, y) tuple as the keyword argument center.
The corners have to be ordered counterclockwise. In the following list
some methods of this polygon class are explained:
centerradius; the corners
might be rounded using the parameters bezierradius and
beziersoftness. For each corner of the box there may be one value
for beziersoftness and two bezierradii. For convenience, it is not necessary
to specify the whole list (for beziersoftness) and the whole list of
lists (bezierradius) here. You may give a single value and/or a 2-tuple instead.
![]() |
a in
the direction (dx, dy); see figure 6.1
a
dx, dy)
x,
y) to the box; the point must be outside of the box
other; when the boxes are overlapping, BoxCrossError is
raised