chiark / gitweb /
docs: wip document shapelibs, move from shapelib-toml
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 00:37:50 +0000 (01:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 May 2021 00:37:50 +0000 (01:37 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
docs/shapelibs.rst
src/shapelib-toml.rs

index 47bad98bcca196d6369b361349a7e639c81839dd..b3e43cc9f769abfc66dc5c93ebb06f097cd1c359 100644 (file)
@@ -178,3 +178,9 @@ Parameters
    If both are specified, the group parameter is used as a template.
    ``_s`` is replaced by the sort extra field from the ``files`` list
    ``_c`` is replaced by the colour, if applicable.
+
+ * ``orig_size`` (1- or 2-element array, or (default) empty array): If
+   non-empty, the supplied image is first scaled from ``orig_size``
+   to ``size``.  If both ``size`` and ```orig_size`` are 2 elements,
+   this can scale by different amounts in x and y, distorting the
+   image.
index 123fd837d7938efb12801b1e8b7991a105e9de29..89d581e9ba40a9f74dcebcd8bb47756b93243126 100644 (file)
@@ -22,12 +22,7 @@ pub struct GroupDefn {
 pub struct GroupDetails {
   #[cfg(doc)]inherit: String, // handled specially
   pub size: Vec<f64>,  // scaled when put into GroupData
-  
-  #[serde(default)]
-  /// If specified, the input is first scaled from `orig_size` to
-  /// `size`.  If both `size` and `orig_size` are 2 elements, may
-  /// scale by different amounts in x and y.
-  pub orig_size: Vec<f64>,
+  #[serde(default)] pub orig_size: Vec<f64>,
 
   #[serde(default)]
   /// Default if not supplied is the centre according to the size.