pub struct TextLine {
pub words: Vec<Word>,
pub bbox: Rect,
pub text: String,
}Expand description
A line of text containing multiple words.
Fields§
§words: Vec<Word>Words in this line
bbox: RectBounding box of the entire line
text: StringComplete text content of the line (words joined by spaces)
Implementations§
Trait Implementations§
Source§impl LayoutObjectSpatial for TextLine
impl LayoutObjectSpatial for TextLine
Source§fn intersects_rect(&self, rect: &Rect) -> bool
fn intersects_rect(&self, rect: &Rect) -> bool
Check if this object intersects with the given rectangle.
Source§fn contained_in_rect(&self, rect: &Rect) -> bool
fn contained_in_rect(&self, rect: &Rect) -> bool
Check if this object is fully contained within the given rectangle.
Source§fn overlap_with_rect(&self, rect: &Rect) -> f32
fn overlap_with_rect(&self, rect: &Rect) -> f32
Calculate the overlap fraction (0.0-1.0) with the given rectangle. Read more
Source§fn matches_filter(&self, rect: &Rect, mode: RectFilterMode) -> bool
fn matches_filter(&self, rect: &Rect, mode: RectFilterMode) -> bool
Check if this object matches the given filter mode for a rectangle.
Auto Trait Implementations§
impl Freeze for TextLine
impl RefUnwindSafe for TextLine
impl Send for TextLine
impl Sync for TextLine
impl Unpin for TextLine
impl UnsafeUnpin for TextLine
impl UnwindSafe for TextLine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more