Simplify image rotation API and its internals

This commit is contained in:
Héctor Ramón Jiménez 2024-05-02 15:21:22 +02:00
parent 09a6bcfffc
commit a57313b23e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
23 changed files with 219 additions and 225 deletions

View file

@ -3,7 +3,7 @@ use crate::core::image;
use crate::core::renderer;
use crate::core::svg;
use crate::core::{
self, Background, Color, Point, Rectangle, Size, Transformation,
self, Background, Color, Point, Radians, Rectangle, Size, Transformation,
};
use crate::graphics;
use crate::graphics::compositor;
@ -154,13 +154,12 @@ where
handle: Self::Handle,
filter_method: image::FilterMethod,
bounds: Rectangle,
rotation: f32,
scale: Size,
rotation: Radians,
) {
delegate!(
self,
renderer,
renderer.draw_image(handle, filter_method, bounds, rotation, scale)
renderer.draw_image(handle, filter_method, bounds, rotation)
);
}
}
@ -179,13 +178,12 @@ where
handle: svg::Handle,
color: Option<Color>,
bounds: Rectangle,
rotation: f32,
scale: Size,
rotation: Radians,
) {
delegate!(
self,
renderer,
renderer.draw_svg(handle, color, bounds, rotation, scale)
renderer.draw_svg(handle, color, bounds, rotation)
);
}
}