From 0ae1baa37bd7b6607f79b33b8a6d8c5daafde0b2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 22 Jun 2023 00:38:36 +0200 Subject: Introduce custom backend-specific primitives --- graphics/src/geometry.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'graphics/src/geometry.rs') diff --git a/graphics/src/geometry.rs b/graphics/src/geometry.rs index 729c3d44..5e547bae 100644 --- a/graphics/src/geometry.rs +++ b/graphics/src/geometry.rs @@ -14,20 +14,10 @@ pub use text::Text; pub use crate::gradient::{self, Gradient}; -use crate::Primitive; - -/// A bunch of shapes that can be drawn. -#[derive(Debug, Clone)] -pub struct Geometry(pub Primitive); - -impl From for Primitive { - fn from(geometry: Geometry) -> Self { - geometry.0 - } -} - /// A renderer capable of drawing some [`Geometry`]. pub trait Renderer: crate::core::Renderer { + type Geometry; + /// Draws the given layers of [`Geometry`]. - fn draw(&mut self, layers: Vec); + fn draw(&mut self, layers: Vec); } -- cgit