to ``size``. If both ``size`` and ```orig_size`` are 2 elements,
this can scale by different amounts in x and y, distorting the
image.
+
+ * ``centre`` [2-element array]. The centre of the image, measured
+ from the top left in the image's own internal units. If not
+ supplied, calculated from the size.
+
+ * ``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;
+ the other face is the same image, but flipped left-to-right. It
+ doesn't make sense to enable this for pieces with a symmetrical
+ appearance. (It is a bad idea to have the game contain state which
+ is not visible to the players.)
#[cfg(doc)]inherit: String, // handled specially
pub size: Vec<f64>, // scaled when put into GroupData
#[serde(default)] pub orig_size: Vec<f64>,
-
- #[serde(default)]
- /// Default if not supplied is the centre according to the size.
- pub centre: Option<[f64; 2]>,
-
- #[serde(default)]
- /// Default is `false`
- pub flip: bool,
+ #[serde(default)] pub centre: Option<[f64; 2]>,
+ #[serde(default)] pub flip: bool,
/// The back of this is some other item. Doesn't make sense
/// with `flip`.