Refactor imports of widget::canvas::frame in iced_graphics
This commit is contained in:
parent
75b05ed42d
commit
4ef778aff3
1 changed files with 7 additions and 7 deletions
|
|
@ -1,15 +1,14 @@
|
|||
use lyon::geom::euclid::Point2D;
|
||||
use std::borrow::Cow;
|
||||
|
||||
use iced_native::{Point, Rectangle, Size, Vector};
|
||||
|
||||
use crate::gradient::Gradient;
|
||||
use crate::triangle;
|
||||
use crate::triangle::Vertex2D;
|
||||
use crate::widget::canvas::{path, Fill, Geometry, Path, Stroke, Text};
|
||||
use crate::Primitive;
|
||||
|
||||
use iced_native::{Point, Rectangle, Size, Vector};
|
||||
|
||||
use lyon::geom::euclid;
|
||||
use lyon::tessellation;
|
||||
use std::borrow::Cow;
|
||||
|
||||
/// The frame of a [`Canvas`].
|
||||
///
|
||||
|
|
@ -67,8 +66,9 @@ pub(crate) struct Transform {
|
|||
impl Transform {
|
||||
/// Transforms the given [Point] by the transformation matrix.
|
||||
fn transform_point(&self, point: &mut Point) {
|
||||
let transformed =
|
||||
self.raw.transform_point(Point2D::new(point.x, point.y));
|
||||
let transformed = self
|
||||
.raw
|
||||
.transform_point(euclid::Point2D::new(point.x, point.y));
|
||||
point.x = transformed.x;
|
||||
point.y = transformed.y;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue