Skip to main content

handle_path_data

Function handle_path_data 

Source
pub fn handle_path_data(
    kind: HandleKind,
    anchor_x: f32,
    line_top: f32,
    line_bottom: f32,
    radius: f32,
) -> String
Expand description

SVG path data for a handle lollipop at a text edge.

anchor_x is the text edge (caret / selection endpoint) x; the line box spans line_top .. line_bottom. The stem (width HANDLE_STEM_WIDTH) always spans the line box, centered on anchor_x; the dot (radius radius) sits tangent just outside the line box — above it for SelectionStart, below it for SelectionEnd and Cursor — overlapping the box edge by HANDLE_DOT_LINE_OVERLAP so the two read as one shape.