[librsvg] Improve the public docs of IntrinsicDimensions



commit e5a7dcf35f732ae1558677fa964d407a6b7060e2
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon May 4 19:05:20 2020 -0500

    Improve the public docs of IntrinsicDimensions

 rsvg_internals/src/structure.rs | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index 8087d379..c766d400 100644
--- a/rsvg_internals/src/structure.rs
+++ b/rsvg_internals/src/structure.rs
@@ -87,11 +87,20 @@ impl Draw for Switch {
     }
 }
 
-/// Intrinsic dimensions of an SVG document fragment
+/// Intrinsic dimensions of an SVG document fragment: its `width`, `height`, `viewBox` attributes.
+///
+/// Note that either of those attributes can be omitted, so they are all `Option<T>`.
+/// For example, an element like `<svg viewBox="0 0 100 100">` will have `vbox=Some(...)`,
+/// and the other two fields set to `None`.
 #[derive(Debug, Copy, Clone, PartialEq)]
 pub struct IntrinsicDimensions {
+    /// Contents of the `width` attribute.
     pub width: Option<Length<Horizontal>>,
+
+    /// Contents of the `height` attribute.
     pub height: Option<Length<Vertical>>,
+
+    /// Contents of the `viewBox` attribute.
     pub vbox: Option<ViewBox>,
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]