From 91a851d0c62d0fbee69ae39fb6beaa3cb72ea1b7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 15 Apr 2022 20:06:57 +0100 Subject: [PATCH] OutlineTrait: Document outline_path Signed-off-by: Ian Jackson --- src/gamestate.rs | 4 ++++ 1 file changed, 4 insertions(+) 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) } -- 2.30.2