diff options
author | 2024-03-16 16:52:21 +0100 | |
---|---|---|
committer | 2024-03-16 16:52:21 +0100 | |
commit | bad3b1ac4777b4d9b57c6ba9473fb97753a77124 (patch) | |
tree | b5675155923b3576df03a6ed67d0943807a38493 /wgpu/src/geometry.rs | |
parent | 348e00e11cd976a16493f4ce693db614886c1ecd (diff) | |
download | iced-bad3b1ac4777b4d9b57c6ba9473fb97753a77124.tar.gz iced-bad3b1ac4777b4d9b57c6ba9473fb97753a77124.tar.bz2 iced-bad3b1ac4777b4d9b57c6ba9473fb97753a77124.zip |
Show name of current `Theme` in `clock` example
Diffstat (limited to 'wgpu/src/geometry.rs')
-rw-r--r-- | wgpu/src/geometry.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wgpu/src/geometry.rs b/wgpu/src/geometry.rs index 8cfcfff0..f4e0fbda 100644 --- a/wgpu/src/geometry.rs +++ b/wgpu/src/geometry.rs @@ -1,6 +1,8 @@ //! Build and draw geometry. use crate::core::text::LineHeight; -use crate::core::{Pixels, Point, Rectangle, Size, Transformation, Vector}; +use crate::core::{ + Pixels, Point, Radians, Rectangle, Size, Transformation, Vector, +}; use crate::graphics::color; use crate::graphics::geometry::fill::{self, Fill}; use crate::graphics::geometry::{ @@ -475,12 +477,12 @@ impl Frame { /// Applies a rotation in radians to the current transform of the [`Frame`]. #[inline] - pub fn rotate(&mut self, angle: f32) { + pub fn rotate(&mut self, angle: impl Into<Radians>) { self.transforms.current.0 = self .transforms .current .0 - .pre_rotate(lyon::math::Angle::radians(angle)); + .pre_rotate(lyon::math::Angle::radians(angle.into().0)); } /// Applies a uniform scaling to the current transform of the [`Frame`]. |