// #[throws] doesn't work here for some reason
fn svg_piece(&self, f: &mut Html, pri: &PieceRenderInstructions) -> IR;
- fn svg_x_defs(&self, f: &mut Html, pri : &PieceRenderInstructions) -> IR;
-
fn describe_html(&self, face : Option<FaceId>) -> Html;
fn delete_hook(&self, _p: &PieceState, _gs: &mut GameState)
write!(&mut defs.0,
r##"<path id="surround{}" d="{}"/>"##,
pri.id, self.surround_path(&pri)?.0)?;
- self.svg_x_defs(&mut defs, &pri)?;
defs
}
self.colours[pri.face].0,
&self.path.0)?;
}
- #[throws(IE)]
- fn svg_x_defs(&self, _f: &mut Html, _pri : &PieceRenderInstructions) {
- }
fn describe_html(&self, face : Option<FaceId>) -> Html {
Html(if let Some(face) = face {
format!("a {} {}", self.colours[face].0, self.desc.0)
face.scale[0], face.scale[1], -face.centre[0], -face.centre[1],
svgd.0)?;
}
- #[throws(IE)]
- fn svg_x_defs(&self, _f: &mut Html, _pri : &PieceRenderInstructions) {
- }
fn describe_html(&self, face : Option<FaceId>) -> Html {
self.descs[ match face {
Some(face) => self.faces[face].desc,