chiark / gitweb /
SimpleShape: Make INVISIBLE_EDGE_SENSITIVE a const
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2021 01:45:55 +0000 (01:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2021 01:47:45 +0000 (01:47 +0000)
nfc

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/pieces.rs

index 2cb8fd18490312a62eb288dcc40874d4e2d9f430..c0c02d10385c8b52214504caf5d9f73cf436d523 100644 (file)
@@ -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##"<path fill="none" \
-                  stroke-width="2" stroke="transparent" d="{}"/>"##,
+                  stroke-width="{}" stroke="transparent" d="{}"/>"##,
+             INVISIBLE_EDGE_SENSITIVE,
              &self.path.0)?;
     }
     write!(f, r##"<path"##)?;