diff options
author | 2022-09-30 10:27:00 -0700 | |
---|---|---|
committer | 2022-09-30 10:27:00 -0700 | |
commit | 5d0fffc626928177239336757507b986b081b878 (patch) | |
tree | 03c6d1c8ab957f3cb5115fe6c75df65110a0ad64 /graphics/src/triangle.rs | |
parent | e25f3d3dea2d2c1ba7d2778948443df2745084be (diff) | |
download | iced-5d0fffc626928177239336757507b986b081b878.tar.gz iced-5d0fffc626928177239336757507b986b081b878.tar.bz2 iced-5d0fffc626928177239336757507b986b081b878.zip |
Fixed some importing issues since you can use a Shader::Gradient outside a Canvas widget, where it was previously only accessible.
Diffstat (limited to 'graphics/src/triangle.rs')
-rw-r--r-- | graphics/src/triangle.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/graphics/src/triangle.rs b/graphics/src/triangle.rs index 92709fe2..8f82c5df 100644 --- a/graphics/src/triangle.rs +++ b/graphics/src/triangle.rs @@ -16,12 +16,4 @@ pub struct Mesh2D { pub struct Vertex2D { /// The vertex position in 2D space. pub position: [f32; 2], -} - -/// Convert from lyon's position data to Iced's Vertex2D type. -impl Vertex2D { - /// Converts from [`lyon::math::Point`] to [`Vertex2D`]. Used for generating primitives. - pub fn from(points: Vec<lyon::math::Point>) -> Vec<Vertex2D> { - points.iter().map(|p| Vertex2D { position: [p.x, p.y]}).collect() - } -} +}
\ No newline at end of file |