summaryrefslogtreecommitdiff
path: root/library/src/visualize
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2022-12-21 15:34:29 +0100
committerMartin Haug <mhaug@live.de>2022-12-21 15:34:29 +0100
commit4af7b9118c5ce612b3d9d7dd06118ce23b731d9c (patch)
tree09cbc42fefc34215b0d878664065a0aec11071b3 /library/src/visualize
parentbe83b3d6877963907c3847608a5083a215a3bfe7 (diff)
Image docs
Diffstat (limited to 'library/src/visualize')
-rw-r--r--library/src/visualize/image.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/library/src/visualize/image.rs b/library/src/visualize/image.rs
index a3eb32a5..1744f389 100644
--- a/library/src/visualize/image.rs
+++ b/library/src/visualize/image.rs
@@ -9,6 +9,16 @@ use crate::prelude::*;
///
/// Supported formats are PNG, JPEG, GIF and SVG.
///
+/// ## Example
+/// ```
+/// #align(center)[
+/// #image("molecular.jpg", width: 2in)
+///
+/// *A step in the molecular testing
+/// pipeline of our lab*
+/// ]
+/// ```
+///
/// ## Parameters
/// - path: EcoString (positional, required)
/// Path to an image file.
@@ -122,10 +132,11 @@ pub enum ImageFit {
castable! {
ImageFit,
- /// The image should completely cover the area.
+ /// The image should completely cover the area. This is the default.
"cover" => Self::Cover,
/// The image should be fully contained in the area.
"contain" => Self::Contain,
- /// The image should be stretched so that it exactly fills the area.
+ /// The image should be stretched so that it exactly fills the area, even if
+ /// this means that the image will be distorted.
"stretch" => Self::Stretch,
}