Skip to main content

shape_candidates

Function shape_candidates 

Source
fn shape_candidates(
    id: ShapeId,
    shape: &ShapeRef<'_>,
    offset: Vec2,
    out: &mut Vec<Candidate>,
)
Expand description

The features a shape contributes. Blocks: edges, centers, and pin rows. Ports: the pin row plus two verticals at the pentagon’s tip and flat back. Areas: edges and centers. Text boxes: only the top-left corner (their box is normally hidden). Images/icons: only the center, so they align center-to-center (an icon to its containing block’s center). offset previews a drag (zero for a resting shape).