summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/canvas/frame.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/widget/canvas/frame.rs')
-rw-r--r--graphics/src/widget/canvas/frame.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/graphics/src/widget/canvas/frame.rs b/graphics/src/widget/canvas/frame.rs
index ccba840a..6dd0d06a 100644
--- a/graphics/src/widget/canvas/frame.rs
+++ b/graphics/src/widget/canvas/frame.rs
@@ -1,4 +1,4 @@
-use lyon::geom::euclid::Vector2D;
+use lyon::geom::euclid::Point2D;
use std::borrow::Cow;
use iced_native::{Point, Rectangle, Size, Vector};
@@ -38,11 +38,11 @@ pub(crate) struct Transform {
impl Transform {
/// Transforms the given [Point] by the transformation matrix.
- pub(crate) fn apply_to(&self, mut point: Point) -> Point {
+ pub(crate) fn transform_point(&self, mut point: Point) -> Point {
let transformed =
- self.raw.transform_vector(Vector2D::new(point.x, point.y));
- point.x = transformed.x + self.raw.m31;
- point.y = transformed.y + self.raw.m32;
+ self.raw.transform_point(Point2D::new(point.x, point.y));
+ point.x = transformed.x;
+ point.y = transformed.y;
point
}
}