chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dd9ea7
)
OutlineTrait: Document outline_path
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 19:06:57 +0000
(20:06 +0100)
committer
Ian 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
patch
|
blob
|
history
diff --git
a/src/gamestate.rs
b/src/gamestate.rs
index c35b0f7bb64a1da3ba434afba2ecf95bf0660fcf..405b53b02a5f548192b08df7f5e6657501953642 100644
(file)
--- 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<Html, IE>;
+ // Used for the piece selection outline
fn surround_path(&self) -> Result<Html, IE> {
self.outline_path(SELECT_SCALE)
}