diff options
author | 2022-05-02 21:21:24 +0200 | |
---|---|---|
committer | 2022-05-02 21:21:24 +0200 | |
commit | 5acba65c1135d8ebbda94efc74ea0bebb29c438a (patch) | |
tree | 88673403313ad90cec226ee92d4ebf4ef0a24bdc /graphics | |
parent | a17a7103d382f02c64e7b271d953ea6babffac97 (diff) | |
parent | 7e111f273fb22a6ffc7a4fd24bea5e838d276758 (diff) | |
download | iced-5acba65c1135d8ebbda94efc74ea0bebb29c438a.tar.gz iced-5acba65c1135d8ebbda94efc74ea0bebb29c438a.tar.bz2 iced-5acba65c1135d8ebbda94efc74ea0bebb29c438a.zip |
Merge pull request #1327 from iced-rs/update-docs
Update documentation
Diffstat (limited to '')
-rw-r--r-- | graphics/src/lib.rs | 4 | ||||
-rw-r--r-- | graphics/src/widget/canvas.rs | 8 | ||||
-rw-r--r-- | graphics/src/widget/pure/canvas/program.rs | 4 | ||||
-rw-r--r-- | graphics/src/window/compositor.rs | 5 |
4 files changed, 11 insertions, 10 deletions
diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs index b3be62af..9661f6ef 100644 --- a/graphics/src/lib.rs +++ b/graphics/src/lib.rs @@ -1,9 +1,9 @@ //! A bunch of backend-agnostic types that can be leveraged to build a renderer //! for [`iced`]. //! -//!  +//!  //! -//! [`iced`]: https://github.com/hecrj/iced +//! [`iced`]: https://github.com/iced-rs/iced #![doc( html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg" )] diff --git a/graphics/src/widget/canvas.rs b/graphics/src/widget/canvas.rs index 6c526e35..23444b2b 100644 --- a/graphics/src/widget/canvas.rs +++ b/graphics/src/widget/canvas.rs @@ -51,10 +51,10 @@ use std::marker::PhantomData; /// - [`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/master/examples -/// [`clock`]: https://github.com/hecrj/iced/tree/master/examples/clock -/// [`game_of_life`]: https://github.com/hecrj/iced/tree/master/examples/game_of_life -/// [`solar_system`]: https://github.com/hecrj/iced/tree/master/examples/solar_system +/// [examples]: https://github.com/iced-rs/iced/tree/0.4/examples +/// [`clock`]: https://github.com/iced-rs/iced/tree/0.4/examples/clock +/// [`game_of_life`]: https://github.com/iced-rs/iced/tree/0.4/examples/game_of_life +/// [`solar_system`]: https://github.com/iced-rs/iced/tree/0.4/examples/solar_system /// /// ## Drawing a simple circle /// If you want to get a quick overview, here's how we can draw a simple circle: diff --git a/graphics/src/widget/pure/canvas/program.rs b/graphics/src/widget/pure/canvas/program.rs index ee74c27f..058b364b 100644 --- a/graphics/src/widget/pure/canvas/program.rs +++ b/graphics/src/widget/pure/canvas/program.rs @@ -10,10 +10,10 @@ use crate::Rectangle; /// /// [`Canvas`]: crate::widget::Canvas pub trait Program<Message> { - /// The internal [`State`] mutated by the [`Program`]. + /// The internal state mutated by the [`Program`]. type State: Default + 'static; - /// Updates the state of the [`Program`]. + /// Updates the [`State`](Self::State) of the [`Program`]. /// /// When a [`Program`] is used in a [`Canvas`], the runtime will call this /// method for each [`Event`]. diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs index 9ea040cd..04a87bc6 100644 --- a/graphics/src/window/compositor.rs +++ b/graphics/src/window/compositor.rs @@ -40,7 +40,8 @@ pub trait Compositor: Sized { /// Presents the [`Renderer`] primitives to the next frame of the given [`Surface`]. /// - /// [`SwapChain`]: Self::SwapChain + /// [`Renderer`]: Self::Renderer + /// [`Surface`]: Self::Surface fn present<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, @@ -51,7 +52,7 @@ pub trait Compositor: Sized { ) -> Result<(), SurfaceError>; } -/// Result of an unsuccessful call to [`Compositor::draw`]. +/// Result of an unsuccessful call to [`Compositor::present`]. #[derive(Clone, PartialEq, Eq, Debug, Error)] pub enum SurfaceError { /// A timeout was encountered while trying to acquire the next frame. |