Apply Transformation to Image::border_radius

This commit is contained in:
Héctor Ramón Jiménez 2025-10-26 00:06:20 +02:00
parent 42d592d87b
commit 1c055e26c0
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 11 additions and 1 deletions

View file

@ -132,7 +132,15 @@ impl Layer {
bounds: Rectangle,
transformation: Transformation,
) {
let image = Image::Raster(image, bounds * transformation);
let image = Image::Raster(
core::Image {
clip_bounds: image.clip_bounds * transformation,
border_radius: image.border_radius
* transformation.scale_factor(),
..image
},
bounds * transformation,
);
self.images.push(image);
}

View file

@ -146,6 +146,8 @@ impl Layer {
let image = Image::Raster(
core::Image {
clip_bounds: image.clip_bounds * transformation,
border_radius: image.border_radius
* transformation.scale_factor(),
..image
},
bounds * transformation,