summaryrefslogtreecommitdiffstats
path: root/graphics/src/geometry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/geometry.rs')
-rw-r--r--graphics/src/geometry.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/graphics/src/geometry.rs b/graphics/src/geometry.rs
index 8db1594a..729c3d44 100644
--- a/graphics/src/geometry.rs
+++ b/graphics/src/geometry.rs
@@ -1,8 +1,4 @@
-//! Draw 2D graphics for your users.
-//!
-//! A [`Canvas`] widget can be used to draw different kinds of 2D shapes in a
-//! [`Frame`]. It can be used for animation, data visualization, game graphics,
-//! and more!
+//! Build and draw geometry.
pub mod fill;
pub mod path;
pub mod stroke;
@@ -16,10 +12,11 @@ pub use stroke::{LineCap, LineDash, LineJoin, Stroke};
pub use style::Style;
pub use text::Text;
-pub use iced_core::gradient::{self, Gradient};
+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);
@@ -29,8 +26,8 @@ impl From<Geometry> for Primitive {
}
}
-pub trait Renderer: iced_core::Renderer {
- type Geometry;
-
- fn draw(&mut self, geometry: Vec<Self::Geometry>);
+/// A renderer capable of drawing some [`Geometry`].
+pub trait Renderer: crate::core::Renderer {
+ /// Draws the given layers of [`Geometry`].
+ fn draw(&mut self, layers: Vec<Geometry>);
}