summaryrefslogtreecommitdiffstats
path: root/graphics/src/geometry.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-22 00:38:36 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-29 07:18:20 +0200
commit0ae1baa37bd7b6607f79b33b8a6d8c5daafde0b2 (patch)
tree7f3d09dca8ea9fae96457d3f9266e014d1d25d80 /graphics/src/geometry.rs
parent8d65e40a1174ecb8225ce9973575bced36e7aeb5 (diff)
downloadiced-0ae1baa37bd7b6607f79b33b8a6d8c5daafde0b2.tar.gz
iced-0ae1baa37bd7b6607f79b33b8a6d8c5daafde0b2.tar.bz2
iced-0ae1baa37bd7b6607f79b33b8a6d8c5daafde0b2.zip
Introduce custom backend-specific primitives
Diffstat (limited to 'graphics/src/geometry.rs')
-rw-r--r--graphics/src/geometry.rs16
1 files changed, 3 insertions, 13 deletions
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<Geometry> 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<Geometry>);
+ fn draw(&mut self, layers: Vec<Self::Geometry>);
}