compress_primitives#

Layout.compress_primitives()#

Compress primitives into primitive instance collections.

Primitives whose only geometric difference is location will be compressed. For example, a 4x4 grid of rectangles with the same width and height will be compressed into one primitive instance collection.

Note

Only Circle, Rectangle, and Polygon primitives are supported in primitive instance collections.