Function set_scissor_rect_scaled

Source
pub fn set_scissor_rect_scaled(
    rpass: &mut RenderPass<'_>,
    w_px: f32,
    h_px: f32,
    scale: Scale,
    clip_logical: Rect,
)
Expand description

Snaps a logical scissor outward at DPR and applies its nonempty intersection.

Surface dimensions are truncated to u32. An empty intersection leaves the existing scissor unchanged.

ยงExamples

use ailloli_ui_core::{math::Scale, Rect};
use ailloli_ui_render_wgpu::passes::set_scissor_rect_scaled;
fn set(pass: &mut wgpu::RenderPass<'_>) { set_scissor_rect_scaled(pass, 200.0, 100.0, Scale::new(2.0), Rect::new(1.0, 2.0, 3.0, 4.0)); }