Function run_visual_bottom

Source
pub fn run_visual_bottom(run: &EditorTextRun, style: EditorStyle) -> f32
Expand description

Returns a run’s bottom edge relative to the text viewport.

§Examples

use ailloli_ui_core::{Color, FontId, TextStyle};
use ailloli_ui_editor::{layout::{run_visual_bottom, run_visual_top, EditorTextRun}, EditorStyle};
use ailloli_ui_text::{TextLayoutParams, TextSystem};
let mut system = TextSystem::new();
let layout = system.layout_cached(TextLayoutParams::new(
    "x", TextStyle::new(FontId::Mono, 13, Color::WHITE),
));
let run = EditorTextRun { index: 0, byte_range: 0..1, baseline_y: 14.0, layout };
assert!(run_visual_bottom(&run, EditorStyle::default()) > run_visual_top(&run));