Function union_cmd_bounds_prepared

Source
pub fn union_cmd_bounds_prepared(
    cmds: &[DrawCmd],
    scale: Scale,
    prepared: &PreparedResources,
) -> Option<Rect>
Expand description

Computes command bounds using prepared glyph extents when available.

Missing prepared glyphs fall back to the text layout rectangle. Non-text commands are identical to union_cmd_bounds.

ยงExamples

use ailloli_ui_core::math::Scale;
use ailloli_ui_render_wgpu::{cmd_bounds::union_cmd_bounds_prepared, PreparedResources};
fn empty(prepared: &PreparedResources) {
    assert_eq!(union_cmd_bounds_prepared(&[], Scale::new(1.0), prepared), None);
}