diff options
author | 2024-03-16 17:09:00 +0100 | |
---|---|---|
committer | 2024-03-16 17:09:00 +0100 | |
commit | 503a48e89977437bf8b7bf485f416a15a2e83ed0 (patch) | |
tree | 30306bbaee7a31090ace9d7725d46c2c0027fe6b /wgpu/src | |
parent | 0524e9b4571d264018656418f02a1f9e27e268d7 (diff) | |
parent | cfc0383bbfff083786840e3f1fd499e5991fa629 (diff) | |
download | iced-503a48e89977437bf8b7bf485f416a15a2e83ed0.tar.gz iced-503a48e89977437bf8b7bf485f416a15a2e83ed0.tar.bz2 iced-503a48e89977437bf8b7bf485f416a15a2e83ed0.zip |
Merge pull request #2331 from iced-rs/program-api
`Program` API
Diffstat (limited to '')
-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`]. |