chiark / gitweb /
provide scaled_path
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 14:07:57 +0000 (15:07 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 14:07:57 +0000 (15:07 +0100)
src/pieces.rs

index 9492dba95003660714ea965fb3568fc04b7c8efe..eef2404744a0bd04c90d0f742f4e0d776762c15b 100644 (file)
@@ -11,7 +11,7 @@ type ColourMap = IndexVec<FaceId,Colour>;
 struct SimpleShape {
   desc : String,
   path : String,
-//  scaled_path : String,
+  scaled_path : String,
   approx_dia : Coord,
   colours : ColourMap,
 }
@@ -113,6 +113,7 @@ impl SimpleShape {
   fn new_from_path(desc: String, path: String, approx_dia: Coord,
                    colours: ColourMap) -> Self {
     SimpleShape {
+      scaled_path : svg_rescale_path(&path, SELECT_SCALE)?,
       desc, approx_dia, path, colours,
     }
   }