Add border radius support for image

This commit is contained in:
Héctor Ramón Jiménez 2025-10-25 22:53:44 +02:00
parent c896cd8d31
commit 44e68aa4b6
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
15 changed files with 256 additions and 188 deletions

View file

@ -97,15 +97,15 @@ impl Cache {
belt: &mut wgpu::util::StagingBelt,
handle: &svg::Handle,
color: Option<Color>,
[width, height]: [f32; 2],
size: Size,
scale: f32,
atlas: &mut Atlas,
) -> Option<&atlas::Entry> {
let id = handle.id();
let (width, height) = (
(scale * width).ceil() as u32,
(scale * height).ceil() as u32,
(scale * size.width).ceil() as u32,
(scale * size.height).ceil() as u32,
);
let color = color.map(Color::into_rgba8);