From: Ian Jackson Date: Sat, 13 Feb 2021 01:45:55 +0000 (+0000) Subject: SimpleShape: Make INVISIBLE_EDGE_SENSITIVE a const X-Git-Tag: otter-0.4.0~524 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=20dff512d0d665d03bbf241fd5894db412ac3497;p=otter.git SimpleShape: Make INVISIBLE_EDGE_SENSITIVE a const nfc Signed-off-by: Ian Jackson --- diff --git a/src/pieces.rs b/src/pieces.rs index 2cb8fd18..c0c02d10 100644 --- a/src/pieces.rs +++ b/src/pieces.rs @@ -25,6 +25,7 @@ struct SimpleShape { pub const SELECT_SCALE: f64 = 1.1; pub const DEFAULT_EDGE_WIDTH: f64 = 0.2; +pub const INVISIBLE_EDGE_SENSITIVE: f64 = 2.; fn default_edge_width() -> f64 { DEFAULT_EDGE_WIDTH } @@ -139,7 +140,8 @@ impl Piece for SimpleShape { if self.colours.len() == 0 { write!(f, r##""##, + stroke-width="{}" stroke="transparent" d="{}"/>"##, + INVISIBLE_EDGE_SENSITIVE, &self.path.0)?; } write!(f, r##"