pub fn caret_intersects_with_holes(
line_caret_x: f32,
line_number: usize,
font_size_px: f32,
line_height_px: f32,
holes: &[LayoutRect],
max_width: Option<f32>,
) -> LineCaretIntersection
Expand description
Check if the caret intersects with any holes and if yes, if the cursor should move to a new line.
§Inputs
line_caret_x
: The current horizontal caret positionline_number
: The current line numberholes
: Whether the text should respect any rectangular regions where the text can’t flow (preparation for inline / float layout).max_width
: Does the text have a restriction on how wide it can be (in pixels)