[librsvg: 4/7] Note where the geometry properties of elements are defined




commit 51416ad89dbde4440cbf4132a7cf7dfd267386df
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Mar 4 19:45:58 2022 -0600

    Note where the geometry properties of elements are defined
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/670>

 src/image.rs     |  4 ++++
 src/shapes.rs    | 12 ++++++++++++
 src/structure.rs |  4 ++++
 3 files changed, 20 insertions(+)
---
diff --git a/src/image.rs b/src/image.rs
index d2f8c7155..b825ef342 100644
--- a/src/image.rs
+++ b/src/image.rs
@@ -16,6 +16,10 @@ use crate::parsers::ParseValue;
 use crate::rect::Rect;
 use crate::xml::Attributes;
 
+/// The `<image>` element.
+///
+/// Note that its x/y/width/height are properties in SVG2, so they are
+/// defined as part of [the properties machinery](properties.rs).
 #[derive(Default)]
 pub struct Image {
     aspect: AspectRatio,
diff --git a/src/shapes.rs b/src/shapes.rs
index f9d0d35d7..5b3f55f2c 100644
--- a/src/shapes.rs
+++ b/src/shapes.rs
@@ -403,6 +403,10 @@ impl BasicShape for Line {
     }
 }
 
+/// The `<rect>` element.
+///
+/// Note that its x/y/width/height/rx/ry are properties in SVG2, so they are
+/// defined as part of [the properties machinery](properties.rs).
 #[derive(Default)]
 pub struct Rect {}
 
@@ -592,6 +596,10 @@ impl BasicShape for Rect {
     }
 }
 
+/// The `<circle>` element.
+///
+/// Note that its cx/cy/r are properties in SVG2, so they are
+/// defined as part of [the properties machinery](properties.rs).
 #[derive(Default)]
 pub struct Circle {}
 
@@ -609,6 +617,10 @@ impl BasicShape for Circle {
     }
 }
 
+/// The `<ellipse>` element.
+///
+/// Note that its cx/cy/rx/ry are properties in SVG2, so they are
+/// defined as part of [the properties machinery](properties.rs).
 #[derive(Default)]
 pub struct Ellipse {}
 
diff --git a/src/structure.rs b/src/structure.rs
index 620a7d8cb..dac71a52c 100644
--- a/src/structure.rs
+++ b/src/structure.rs
@@ -123,6 +123,10 @@ pub struct IntrinsicDimensions {
     pub vbox: Option<ViewBox>,
 }
 
+/// The `<svg>` element.
+///
+/// Note that its x/y/width/height are properties in SVG2, so they are
+/// defined as part of [the properties machinery](properties.rs).
 #[derive(Default)]
 pub struct Svg {
     preserve_aspect_ratio: AspectRatio,


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