2.2.9. Multiple Elements in the Same Space (layout.managers.overlay)

Overlaying is the process of having more than one element in the same space. In this module is a simple layout manager to achieve this, but other layout managers may also provide this facility. The GridLM, for example, allows you to overlay many elements in each grid cell.

class layout.managers.overlay.OverlayLM(elements: Sequence[layout.managers.root.LayoutElement] = []) → None

Bases: layout.managers.root.GroupLayoutManager

A layout manager that has any number of elements, all occupying the same area. The elements are drawn in strictly the same order that they are added to the manager, so early items form a back ground for later items.

get_minimum_size(data)

How small can the element be? Should return a Point.

render(rect, data)

Asks the element to render itself.