pub fn recheck_and_redraw(&mut self, new_dims: ImageDims) {
        let mut should_redraw = false;
        let mut should_reiterate = false;
        let mut should_recolor = false;

        if new_dims != self.cur_dims {
            should_redraw = true;
            self.cur_dims = new_dims;
        }

        let new_iter = self.iter_pane.get_itertype();
        if new_iter != self.cur_iter {
            should_redraw = true;
            self.cur_iter = new_iter;
        }

        let new_spec = self.colr_pane.get_spec();
        if new_spec != self.cur_spec {
            let new_cmap = ColorMap::make(new_spec.clone());
            if new_cmap.len() > self.cur_cmap.len() {
                should_reiterate = true;
            }
            self.cur_spec = new_spec;
            self.cur_cmap = new_cmap;
            should_recolor = true;
        }

        if should_redraw {
            self.cur_imap = IterMap::new(self.cur_dims, self.cur_iter.clone(), self.cur_cmap.len());
            should_recolor = true;
        } else if should_reiterate {
            self.cur_imap.reiterate(self.cur_cmap.len());
            should_recolor = true;
        }

        if should_recolor {
            self.cur_fimg = self.cur_imap.color(&self.cur_cmap);
        }

        let (x, y, data) = self.cur_fimg.to_rgb8(self.cur_scale);

        self.main_pane.set_image(x, y, data);
    }
// Given the passed `ImageDims`, decides how much recalculation should
// be done, and does only that much, to re-display the current image.
Given the passed `ImageDims`, decides how much recalculation should
be done, and does only that much, to re-display the current image.
Given the passed ` ImageDims ` decides how much recalculation should be done and does only that much to re - display the current image .
pub fn recheck_and_redraw(&mut self, new_dims: ImageDims) {
        let mut should_redraw = false;
        let mut should_reiterate = false;
        let mut should_recolor = false;
        if new_dims != self.cur_dims {
            should_redraw = true;
            self.cur_dims = new_dims;
        }
        let new_iter = self.iter_pane.get_itertype();
        if new_iter != self.cur_iter {
            should_redraw = true;
            self.cur_iter = new_iter;
        }
        let new_spec = self.colr_pane.get_spec();
        if new_spec != self.cur_spec {
            let new_cmap = ColorMap::make(new_spec.clone());
            if new_cmap.len() > self.cur_cmap.len() {
                should_reiterate = true;
            }
            self.cur_spec = new_spec;
            self.cur_cmap = new_cmap;
            should_recolor = true;
        }
        if should_redraw {
            self.cur_imap = IterMap::new(self.cur_dims, self.cur_iter.clone(), self.cur_cmap.len());
            should_recolor = true;
        } else if should_reiterate {
            self.cur_imap.reiterate(self.cur_cmap.len());
            should_recolor = true;
        }
        if should_recolor {
            self.cur_fimg = self.cur_imap.color(&self.cur_cmap);
        }
        let (x, y, data) = self.cur_fimg.to_rgb8(self.cur_scale);
        self.main_pane.set_image(x, y, data);
    }
pub fn recheck_and_redraw ( & mut self , new_dims : ImageDims ) { let mut should_redraw = false ; let mut should_reiterate = false ; let mut should_recolor = false ; if new_dims != self . cur_dims { should_redraw = true ; self . cur_dims = new_dims ; } let new_iter = self . iter_pane . get_itertype ( ) ; if new_iter != self . cur_iter { should_redraw = true ; self . cur_iter = new_iter ; } let new_spec = self . colr_pane . get_spec ( ) ; if new_spec != self . cur_spec { let new_cmap = ColorMap :: make ( new_spec . clone ( ) ) ; if new_cmap . len ( ) > self . cur_cmap . len ( ) { should_reiterate = true ; } self . cur_spec = new_spec ; self . cur_cmap = new_cmap ; should_recolor = true ; } if should_redraw { self . cur_imap = IterMap :: new ( self . cur_dims , self . cur_iter . clone ( ) , self . cur_cmap . len ( ) ) ; should_recolor = true ; } else if should_reiterate { self . cur_imap . reiterate ( self . cur_cmap . len ( ) ) ; should_recolor = true ; } if should_recolor { self . cur_fimg = self . cur_imap . color ( & self . cur_cmap ) ; } let ( x , y , data ) = self . cur_fimg . to_rgb8 ( self . cur_scale ) ; self . main_pane . set_image ( x , y , data ) ; }
Given the passed `ImageDims`, decides how much recalculation should
be done, and does only that much, to re-display the current image.
Given the passed ` ImageDims ` decides how much recalculation should be done and does only that much to re - display the current image .
&mut self
new_dims
ImageDims
&mut self
new_dims
ImageDims