Skip to main content

estimate_bbox_for_pin_stub

Function estimate_bbox_for_pin_stub 

Source
pub fn estimate_bbox_for_pin_stub(
    left: f32,
    right: f32,
    side: PinSide,
    line_y: f32,
) -> Rect
Expand description

Hit region for a pin/port stub (the red line): the stub segment, widened to +/- GRID_SIZE / 3 vertically so it presents an easy click target. left/right are the shape’s edge x-coordinates; line_y the stub’s y.