From 48b90a752915557f216bcbc808f4163a4d110dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 2 Apr 2020 02:51:33 +0200 Subject: [PATCH] Add examples to `Canvas` documentation --- wgpu/src/widget/canvas.rs | 17 +++++++++++++++-- 1 file 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 {