pub fn push_rect_scaled(
out: &mut Vec<Vertex>,
w: f32,
h: f32,
scale: Scale,
r: Rect,
c: Color,
)Expand description
Appends a solid rectangle after scaling logical geometry to physical pixels.
w and h are the physical render-target extent used for NDC conversion.
ยงExamples
use ailloli_ui_core::{math::Scale, Color, Rect};
use ailloli_ui_render_wgpu::passes::push_rect_scaled;
let mut vertices = Vec::new();
push_rect_scaled(&mut vertices, 20.0, 20.0, Scale::new(2.0),
Rect::new(0.0, 0.0, 10.0, 10.0), Color::WHITE);
assert_eq!(vertices[2].pos, [1.0, -1.0]);