pub fn union_cmd_bounds(cmds: &[DrawCmd], scale: Scale) -> Option<Rect>Expand description
Union of axis-aligned bounds for all commands in a layer (physical pixels).
Returns None for an empty command slice. Logical geometry is multiplied by
scale.dpr; text initially uses layout bounds and decorations, while
polylines include half their nonnegative stroke width plus one logical pixel.
ยงExamples
use ailloli_ui_core::math::Scale;
use ailloli_ui_render_wgpu::cmd_bounds::union_cmd_bounds;
assert_eq!(union_cmd_bounds(&[], Scale::new(2.0)), None);