Skip to main content

Module selection_bounds

Module selection_bounds 

Source
Expand description

World-space bounding boxes for the current selection. Shared by the selection frames (drawn on the canvas) and the selection overlay (placed in screen space), so both agree on what region a selection occupies.

Functions§

pins_bounds 🔒
The union of the drawn extent (stub + name/type/tag labels) of each pin. Needs the painter to measure label text.
route_bounds 🔒
The bounding box of a route’s polyline, expanded slightly so an axis-aligned route (zero-width or zero-height bbox) still yields a usable region.
selection_world_bounds
The world-space bounding box of whatever sel covers, or None if it can’t be resolved. Used to place the selection overlay relative to the selection.
shapes_bounds 🔒
The union of the given shapes’ gui_rects, or None if none resolve.