Skip to main content

pin_name_rect_at

Function pin_name_rect_at 

Source
pub fn pin_name_rect_at(
    pos: Pos2,
    h_align: Align,
    name: &str,
    painter: &Style<'_, impl Renderer>,
) -> Rect
Expand description

Rect of a pin’s name line at world anchor pos/h_align, positioned exactly as draw_pin_labels (centered on the stub). An empty name is sized to the “Add Name” placeholder so the slot stays a click/placeholder target while the shape is selected.