# HG changeset patch # User alfadur # Date 1540915719 -10800 # Node ID bf77c4d2294f99990e1660785a670e08b6f769b4 # Parent 2869c2ccb1b8dd17c16bc09e1f0ef5f551cf8a1b fix theme editor diff -r 2869c2ccb1b8 -r bf77c4d2294f 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());