Skip to main content

Module painted_region

Module painted_region 

Source

Structsยง

PaintedRegion ๐Ÿ”’
A set of disjoint, axis-aligned rectangles that tracks exactly which area has already been painted for a Container Timing container, so that overlapping fragments (e.g. two overlapping <img>s) arenโ€™t double-counted.

Functionsยง

subtract_all ๐Ÿ”’
Returns the portion of rect not covered by any rect in others, as a set of disjoint rects (possibly empty, if others fully covers rect).
subtract_one ๐Ÿ”’
Splits a into the (up to four) disjoint rects that remain once b is removed from it.