summaryrefslogtreecommitdiffstats
path: root/native/src/widget/image.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-29 07:34:14 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-29 07:34:14 +0200
commit61c707fe044e7abc035f1a35697757f55f955417 (patch)
treed5c99fe78400bb51b2d97ebb9145e897e5f4473a /native/src/widget/image.rs
parentdc51080328caa12d2b1fc02febc72cab70bb9f50 (diff)
parente0aa89cee764eebb1cb06f0b0653f82b337620ea (diff)
downloadiced-61c707fe044e7abc035f1a35697757f55f955417.tar.gz
iced-61c707fe044e7abc035f1a35697757f55f955417.tar.bz2
iced-61c707fe044e7abc035f1a35697757f55f955417.zip
Merge branch 'master' into feature/canvas-interaction
Diffstat (limited to 'native/src/widget/image.rs')
-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.
///