summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-05-02 15:21:22 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-05-02 17:28:28 +0200
commita57313b23ecb9843856ca0ea08635b6121fcb2cb (patch)
tree42a88a4e42031ae99ae87aeb92fea85ab590b01e /graphics
parent09a6bcfffc24f5abdc8709403bab7ae1e01563f1 (diff)
downloadiced-a57313b23ecb9843856ca0ea08635b6121fcb2cb.tar.gz
iced-a57313b23ecb9843856ca0ea08635b6121fcb2cb.tar.bz2
iced-a57313b23ecb9843856ca0ea08635b6121fcb2cb.zip
Simplify image rotation API and its internals
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/image.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/graphics/src/image.rs b/graphics/src/image.rs
index 083248bf..4fd6998d 100644
--- a/graphics/src/image.rs
+++ b/graphics/src/image.rs
@@ -2,7 +2,7 @@
#[cfg(feature = "image")]
pub use ::image as image_rs;
-use crate::core::{image, svg, Color, Rectangle, Size};
+use crate::core::{image, svg, Color, Radians, Rectangle};
/// A raster or vector image.
#[derive(Debug, Clone, PartialEq)]
@@ -19,10 +19,7 @@ pub enum Image {
bounds: Rectangle,
/// The rotation of the image in radians
- rotation: f32,
-
- /// The scale of the image after rotation
- scale: Size,
+ rotation: Radians,
},
/// A vector image.
Vector {
@@ -36,10 +33,7 @@ pub enum Image {
bounds: Rectangle,
/// The rotation of the image in radians
- rotation: f32,
-
- /// The scale of the image after rotation
- scale: Size,
+ rotation: Radians,
},
}