pub fn make_tex_rect_scaled(
w: f32,
h: f32,
scale: Scale,
img: DrawImage,
) -> [TexVertex; 6]Expand description
Builds a full-UV image quad after scaling logical bounds to physical pixels.
Tint components pass through unchanged and UVs cover the entire texture.
ยงExamples
use ailloli_ui_core::math::Scale;
use ailloli_ui_render_wgpu::passes::make_tex_rect_scaled;
use ailloli_ui_runtime::DrawImage;
fn build(image: DrawImage) {
let quad = make_tex_rect_scaled(200.0, 100.0, Scale::new(2.0), image);
assert_eq!(quad[0].uv, [0.0, 0.0]);
}