chiark / gitweb /
OutlineTrait: Document outline_path
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 19:06:57 +0000 (20:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 21:43:43 +0000 (22:43 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/gamestate.rs

index c35b0f7bb64a1da3ba434afba2ecf95bf0660fcf..405b53b02a5f548192b08df7f5e6657501953642 100644 (file)
@@ -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<Html, IE>;
+  // Used for the piece selection outline
   fn surround_path(&self) -> Result<Html, IE> {
     self.outline_path(SELECT_SCALE)
   }