rust/land2d/src/lib.rs
changeset 13949 a1895019bb94
parent 13948 c6e1769ac9aa
child 13951 03e41712eef8
equal deleted inserted replaced
13948:c6e1769ac9aa 13949:a1895019bb94
   223     }
   223     }
   224 
   224 
   225     pub fn draw_thick_line(&mut self, from: Point, to: Point, radius: i32, value: T) -> usize {
   225     pub fn draw_thick_line(&mut self, from: Point, to: Point, radius: i32, value: T) -> usize {
   226         let mut result = 0;
   226         let mut result = 0;
   227 
   227 
   228         for point in LinePoints::new(from, to) {
   228         for vector in ArcPoints::new(radius) {
   229             for vector in ArcPoints::new(radius) {
   229             for delta in EquidistantPoints::new(vector) {
   230                 for delta in EquidistantPoints::new(vector) {
   230                 for point in LinePoints::new(from, to) {
   231                     self.map_point(point + delta, |p| {
   231                     self.map_point(point + delta, |p| {
   232                         if *p != value {
   232                         if *p != value {
   233                             *p = value;
   233                             *p = value;
   234                             result += 1;
   234                             result += 1;
   235                         }
   235                         }