summaryrefslogtreecommitdiffstats
path: root/wgpu/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-02 02:51:33 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-02 03:44:14 +0200
commit48b90a752915557f216bcbc808f4163a4d110dac (patch)
treeae5bc8db4987fa802e6ee7979fa88e28d178401d /wgpu/src/widget
parent1b0cb0d13ab2854de9da0f30e20b92a5159c244e (diff)
downloadiced-48b90a752915557f216bcbc808f4163a4d110dac.tar.gz
iced-48b90a752915557f216bcbc808f4163a4d110dac.tar.bz2
iced-48b90a752915557f216bcbc808f4163a4d110dac.zip
Add examples to `Canvas` documentation
Diffstat (limited to 'wgpu/src/widget')
-rw-r--r--wgpu/src/widget/canvas.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/wgpu/src/widget/canvas.rs b/wgpu/src/widget/canvas.rs
index 6c9a9e19..325f90ce 100644
--- a/wgpu/src/widget/canvas.rs
+++ b/wgpu/src/widget/canvas.rs
@@ -39,8 +39,21 @@ pub use text::Text;
/// [`Canvas`]: struct.Canvas.html
/// [`Layer`]: layer/trait.Layer.html
///
-/// # Example
-/// Let's see how we can draw a circle:
+/// # Examples
+/// The repository has a couple of [examples] showcasing how to use a
+/// [`Canvas`]:
+///
+/// - [`clock`], an application that uses the [`Canvas`] widget to draw a clock
+/// and its hands to display the current time.
+/// - [`solar_system`], an animated solar system drawn using the [`Canvas`] widget
+/// and showcasing how to compose different transforms.
+///
+/// [examples]: https://github.com/hecrj/iced/tree/0.1/examples
+/// [`clock`]: https://github.com/hecrj/iced/tree/0.1/examples/clock
+/// [`solar_system`]: https://github.com/hecrj/iced/tree/0.1/examples/solar_system
+///
+/// ## Drawing a simple circle
+/// If you want to get a quick overview, here's how we can draw a simple circle:
///
/// ```no_run
/// # mod iced {