zenthra_text/types/line.rs
1/// Information about a single line of shaped text.
2/// Used for rendering backgrounds and handling selection/click events.
3#[derive(Debug, Clone, Copy, PartialEq)]
4pub struct LineInfo {
5 /// Relative X offset within the container (for alignment).
6 pub x: f32,
7 /// Vertical position (baseline) of the line.
8 pub y: f32,
9 /// Visual width of the text in this line.
10 pub width: f32,
11 /// The byte index in the source string where this line starts.
12 pub start_cluster: usize,
13}