fix theme editor
authoralfadur
Tue, 30 Oct 2018 19:08:39 +0300
changeset 14038 bf77c4d2294f
parent 14037 2869c2ccb1b8
child 14044 aeac678d7c79
fix theme editor
rust/theme-editor/src/main.rs
--- a/rust/theme-editor/src/main.rs	Tue Oct 30 19:05:52 2018 +0300
+++ b/rust/theme-editor/src/main.rs	Tue Oct 30 19:08:39 2018 +0300
@@ -7,7 +7,7 @@
     }
 };
 
-use integral_geometry::Point;
+use integral_geometry::{Point, Size};
 
 use rand::{
     thread_rng, RngCore, Rng,
@@ -64,6 +64,7 @@
 
 const WIDTH: u32 = 512;
 const HEIGHT: u32 = 512;
+const SIZE: Size = Size {width: 512, height: 512};
 
 fn main() {
     let sdl = sdl2::init().unwrap();
@@ -82,7 +83,7 @@
         Point::new(rnd(WIDTH as i32), rnd(HEIGHT as i32))
     }
 
-    let mut land = Land2D::new(WIDTH as usize, HEIGHT as usize, 0);
+    let mut land = Land2D::new(SIZE, 0);
     for i in 0..32 {
         land.draw_thick_line(point(), point(), rnd(5), u32::max_value());