Expand description
Rectangles and point arrays (fontTools.misc.arrayTools).
Comparisons follow Python’s min and max, which keep the first argument
unless the second one is strictly smaller or larger.
Functions§
- as_
int16 asInt16: each value rounded half up.- calc_
bounds calcBounds: the bounding rectangle of the points;(0, 0, 0, 0)if there are none.- calc_
int_ bounds calcIntBounds: the bounding rectangle, rounded withround(otRoundin fontTools).- inset_
rect insetRect: the rectangle inset bydxanddyon all sides.- int_
rect intRect: the smallest integer rectangle containing the rectangle.- norm_
rect normRect: the rectangle withxMin <= xMaxandyMin <= yMax.- offset_
rect offsetRect.- pairwise
pairwise: each item with the next one, the last with the first; in reverse order ifreverse.- point_
in_ rect pointInRect: whether the point is inside the rectangle or on its edge.- points_
in_ rect pointsInRect: for each point, whether it is inside the rectangle.- quantize_
rect quantizeRect: the rectangle, normalized, with its edges moved outwards to multiples offactor.Nonefor a factor below 1 (ValueError).- rect_
area rectArea.- rect_
center rectCenter.- scale_
rect scaleRect.- sect_
rect sectRect: the intersection of the rectangles, orNoneif they do not intersect ((False, (0, 0, 0, 0))).- union_
rect unionRect: the smallest rectangle containing both.- update_
bounds updateBounds: the rectangle extended to includep.- vector_
length vectorLength.