Function clip_bbox_physical

Source
pub fn clip_bbox_physical(shape: &ClipShape, dpr: f32) -> Rect
Expand description

Clip bounding box in physical pixels.

Coordinates are multiplied by dpr without clamping or rounding.

ยงExamples

use ailloli_ui_core::{ClipShape, Rect};
use ailloli_ui_render_wgpu::clip::clip_bbox_physical;
let shape = ClipShape::Rect(Rect::new(1.0, 2.0, 3.0, 4.0));
assert_eq!(clip_bbox_physical(&shape, 2.0), Rect::new(2.0, 4.0, 6.0, 8.0));