summaryrefslogtreecommitdiffstats
path: root/graphics/src/geometry.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-11 15:25:58 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-11 15:25:58 +0200
commit8622e998f2701e7f4ca8d2f71c85150f436a9945 (patch)
treede62eead3db44002997b83849711533b214aae31 /graphics/src/geometry.rs
parentdd04c0b070b60b15293892e2a7c284787d3d63b1 (diff)
downloadiced-8622e998f2701e7f4ca8d2f71c85150f436a9945.tar.gz
iced-8622e998f2701e7f4ca8d2f71c85150f436a9945.tar.bz2
iced-8622e998f2701e7f4ca8d2f71c85150f436a9945.zip
Write missing documentation in `iced_graphics`
Diffstat (limited to 'graphics/src/geometry.rs')
-rw-r--r--graphics/src/geometry.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/graphics/src/geometry.rs b/graphics/src/geometry.rs
index 8db1594a..1f3d2c01 100644
--- a/graphics/src/geometry.rs
+++ b/graphics/src/geometry.rs
@@ -16,10 +16,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::core::gradient::{self, Gradient};
use crate::Primitive;
+/// A bunch of shapes that can be drawn.
#[derive(Debug, Clone)]
pub struct Geometry(pub Primitive);
@@ -29,8 +30,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>);
}