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::gradient::Gradient;
|
||||||
use crate::triangle;
|
use crate::triangle;
|
||||||
use crate::triangle::Vertex2D;
|
use crate::triangle::Vertex2D;
|
||||||
use crate::widget::canvas::{path, Fill, Geometry, Path, Stroke, Text};
|
use crate::widget::canvas::{path, Fill, Geometry, Path, Stroke, Text};
|
||||||
use crate::Primitive;
|
use crate::Primitive;
|
||||||
|
|
||||||
|
use iced_native::{Point, Rectangle, Size, Vector};
|
||||||
|
|
||||||
|
use lyon::geom::euclid;
|
||||||
use lyon::tessellation;
|
use lyon::tessellation;
|
||||||
|
use std::borrow::Cow;
|
||||||
|
|
||||||
/// The frame of a [`Canvas`].
|
/// The frame of a [`Canvas`].
|
||||||
///
|
///
|
||||||
|
|
@ -67,8 +66,9 @@ pub(crate) struct Transform {
|
||||||
impl Transform {
|
impl Transform {
|
||||||
/// Transforms the given [Point] by the transformation matrix.
|
/// Transforms the given [Point] by the transformation matrix.
|
||||||
fn transform_point(&self, point: &mut Point) {
|
fn transform_point(&self, point: &mut Point) {
|
||||||
let transformed =
|
let transformed = self
|
||||||
self.raw.transform_point(Point2D::new(point.x, point.y));
|
.raw
|
||||||
|
.transform_point(euclid::Point2D::new(point.x, point.y));
|
||||||
point.x = transformed.x;
|
point.x = transformed.x;
|
||||||
point.y = transformed.y;
|
point.y = transformed.y;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue