pub struct VisibleTextLayout {
pub runs: Vec<EditorTextRun>,
pub content_size: Size,
pub metrics_stats: ParagraphMetricsStats,
pub used_fast_path: bool,
}Expand description
Visible paragraph layouts plus whole-content scroll metrics.
§Examples
use ailloli_ui_core::Size;
use ailloli_ui_editor::layout::{ParagraphMetricsStats, VisibleTextLayout};
let visible = VisibleTextLayout {
runs: Vec::new(),
content_size: Size::new(0.0, 0.0),
metrics_stats: ParagraphMetricsStats::default(),
used_fast_path: false,
};
assert!(visible.runs.is_empty());Fields§
§runs: Vec<EditorTextRun>Paragraph runs intersecting the viewport, in logical order.
content_size: SizeEstimated or shaped full-content width and height in logical pixels.
metrics_stats: ParagraphMetricsStatsMetrics-cache activity during this build.
used_fast_path: boolWhether the no-wrap virtualized path avoided shaping offscreen lines.
Trait Implementations§
Source§impl Clone for VisibleTextLayout
impl Clone for VisibleTextLayout
Source§fn clone(&self) -> VisibleTextLayout
fn clone(&self) -> VisibleTextLayout
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VisibleTextLayout
impl !RefUnwindSafe for VisibleTextLayout
impl Send for VisibleTextLayout
impl Sync for VisibleTextLayout
impl Unpin for VisibleTextLayout
impl !UnwindSafe for VisibleTextLayout
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