// #[throws] doesn't work here for some reason
fn svg_piece(&self, f: &mut String, pri: &PieceRenderInstructions) -> SR;
+/*
#[throws(SE)]
fn outline_path(&self, pri : &PieceRenderInstructions) -> String;
+*/
#[throws(SE)]
fn surround_path(&self, pri : &PieceRenderInstructions) -> String;
r##"<path id="select{}" stroke="black" fill="none" d="{}"/>"##,
pri.id, pr.p.surround_path(&pri)?)?;
write!(defs,
- r##"<path id="halo{}" stroke="none" fill="yellow" d="{} {}"/>"##,
+ r##"<path id="halo{}" stroke="yellow" stroke-width="2px" fill="none" d="{}"/>"##,
pri.id,
- pr.p.surround_path(&pri)?,
- pr.p.outline_path(&pri)?)?;
+ pr.p.surround_path(&pri)?)?;
pr.p.svg_x_defs(&mut defs, &pri)?;
defs
}
#[throws(SE)]
fn svg_piece(&self, f: &mut String, pri: &PieceRenderInstructions) {
write!(f, r##"<path fill="{}" d="{}"/>"##,
- self.colours[pri.face], self.path)?;
+ self.colours[pri.face],
+ svg_rescale_path(&self.path, 0.5)?,
+ )?;
}
+/*
#[throws(SE)]
fn outline_path(&self, _pri : &PieceRenderInstructions) -> String {
self.path.clone()
}
+*/
#[throws(SE)]
fn surround_path(&self, _pri : &PieceRenderInstructions) -> String {
self.scaled_path.clone()