summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-04-27 17:49:13 +0200
committerLibravatar GitHub <noreply@github.com>2020-04-27 17:49:13 +0200
commite0aa89cee764eebb1cb06f0b0653f82b337620ea (patch)
tree4d5700b200cac61e4bcb809608c1f7d2cc6ad711 /native
parent3f4770fd28bd23fb1560371dc9f81ba09e3a81cc (diff)
parentda2ab420cee41f5570568ce73b7c49613c794c55 (diff)
downloadiced-e0aa89cee764eebb1cb06f0b0653f82b337620ea.tar.gz
iced-e0aa89cee764eebb1cb06f0b0653f82b337620ea.tar.bz2
iced-e0aa89cee764eebb1cb06f0b0653f82b337620ea.zip
Merge pull request #324 from ethanpailes/document-image-format-guessing
document that img handle constructors guess fmt
Diffstat (limited to '')
-rw-r--r--native/src/widget/image.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs
index 6bd0fd68..132f249d 100644
--- a/native/src/widget/image.rs
+++ b/native/src/widget/image.rs
@@ -123,6 +123,8 @@ pub struct Handle {
impl Handle {
/// Creates an image [`Handle`] pointing to the image of the given path.
///
+ /// Makes an educated guess about the image format by examining the data in the file.
+ ///
/// [`Handle`]: struct.Handle.html
pub fn from_path<T: Into<PathBuf>>(path: T) -> Handle {
Self::from_data(Data::Path(path.into()))
@@ -145,6 +147,8 @@ impl Handle {
/// Creates an image [`Handle`] containing the image data directly.
///
+ /// Makes an educated guess about the image format by examining the given data.
+ ///
/// This is useful if you already have your image loaded in-memory, maybe
/// because you downloaded or generated it procedurally.
///