From: Ian Jackson Date: Fri, 15 Apr 2022 19:06:57 +0000 (+0100) Subject: OutlineTrait: Document outline_path X-Git-Tag: otter-1.1.0~557 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=91a851d0c62d0fbee69ae39fb6beaa3cb72ea1b7;p=otter.git OutlineTrait: Document outline_path Signed-off-by: Ian Jackson --- diff --git a/src/gamestate.rs b/src/gamestate.rs index c35b0f7b..405b53b0 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -151,7 +151,11 @@ impl_downcast!(PieceXData); #[enum_dispatch] #[dyn_upcast] pub trait OutlineTrait: Debug + Sync + Send + 'static { + // This is used: + // 1. To generate the path for SimpleShape's renderings + // 2. This call here in the default impl of surround_path fn outline_path(&self, scale: f64) -> Result; + // Used for the piece selection outline fn surround_path(&self) -> Result { self.outline_path(SELECT_SCALE) }