diff options
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 |