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

index 422e36ee79124319591c175ad5db8fa9cf87592e..47bad98bcca196d6369b361349a7e639c81839dd 100644 (file)
@@ -159,6 +159,12 @@ Parameters
    the usual default value: the latter would override any inherited
    setting.
 
+ * ``size`` (mandatory; 1- or 2-element array of numbers: width and height).
+   The size at which the piece will show up in the game, in nominal
+   game coordinate units.  For reference: the builtin library's chess
+   pieces are 9.5 units; the builtin playing cards are 9.65,17.125.
+   NB, this value can be affected by ``scale``.
+
  * ``item_prefix``, ``item_suffix`` (strings, default ``""``).
    Prepaended and appended to ``ITEM-SPEC`` in ``files`` to
    produce the item name.
index 33691703418e33a051e216447cd792285917ca16..123fd837d7938efb12801b1e8b7991a105e9de29 100644 (file)
@@ -20,13 +20,8 @@ pub struct GroupDefn {
 
 #[derive(Debug,Deserialize)]
 pub struct GroupDetails {
-  #[cfg(doc)] // handled specially
-  inherit: String,
-
-  /// Should be either a 1- or 2- element list, x and y, or just one
-  /// number for both.
-  // scaled when put into GroupData
-  pub size: Vec<f64>,
+  #[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