summaryrefslogtreecommitdiffstats
path: root/native/src/image.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-04 19:24:25 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-04 19:24:25 +0700
commit597ef7d5fcab8e499d9d1b6b8871e78604345da7 (patch)
treed325e039abbb22ddff00a580e816547aae7ec4e9 /native/src/image.rs
parent023aded2772f0cd6abd716fe5c8624d5d22e21fa (diff)
downloadiced-597ef7d5fcab8e499d9d1b6b8871e78604345da7.tar.gz
iced-597ef7d5fcab8e499d9d1b6b8871e78604345da7.tar.bz2
iced-597ef7d5fcab8e499d9d1b6b8871e78604345da7.zip
Write documentation for `iced_native::image`
Diffstat (limited to '')
-rw-r--r--native/src/image.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/native/src/image.rs b/native/src/image.rs
index 05e086de..00379417 100644
--- a/native/src/image.rs
+++ b/native/src/image.rs
@@ -1,3 +1,4 @@
+//! Load and draw raster graphics.
use crate::{Hasher, Rectangle};
use std::hash::{Hash, Hasher as _};
@@ -110,13 +111,14 @@ impl std::fmt::Debug for Data {
}
}
-/// A [`Renderer`] that can render images.
+/// A [`Renderer`] that can render raster graphics.
///
/// [renderer]: crate::renderer
pub trait Renderer: crate::Renderer {
- /// Returns the dimensions of an [`Image`] located on the given path.
+ /// Returns the dimensions of an image for the given [`Handle`].
fn dimensions(&self, handle: &Handle) -> (u32, u32);
- // Draws an [`Image`].
+ /// Draws an image with the given [`Handle`] and inside the provided
+ /// `bounds`.
fn draw(&mut self, handle: Handle, bounds: Rectangle);
}