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

index 581ce95a283489cdea420b2bfafaf0c99cbd88b6..b9465cc44fc12e96cea47ebd82282d604788ed2e 100644 (file)
@@ -179,6 +179,12 @@ Parameters
    ``_s`` is replaced by the sort extra field from the ``files`` list
    ``_c`` is replaced by the colour, if applicable.
 
+ * ``outline`` [mandatory: string, one of ``"Circle"`` or ``"Rect"``].
+   Defines the outline shape.  This is used for drawing selection
+   highlights, etc.  The size is taken from ``size``.  If ``outline``
+   is ``Circl``, ``size`` must be a 1-element array: ellipses are not
+   supported.
+
  * ``flip`` [boolean, default: false].  Whether this piece can "flip".
    If true, the piece will have two faces, one of which is a mirror
    image of the other.  The default face will be un-reflected version;
index bd8e502c31315acfb15820ddef044c25f669a907..77046cd176fd2786f545501f7bb5ce90d2284bfb 100644 (file)
@@ -30,12 +30,6 @@ pub struct GroupDetails {
   #[serde(default)] pub colours: HashMap<String, RecolourData>,
   pub desc_template: Option<String>,
   pub occulted: Option<OccultationMethod>,
-
-  /// One of `"Circle"` or `"Rect"`, to define the outline shape.
-  /// The size is taken from `size`.
-  ///
-  /// This value is a string, not some weird Rust type, despite
-  /// what you see here.
   #[serde(flatten)] pub outline: Box<dyn shapelib::OutlineDefn>,
 }