/** Return a new view zoomed in by the given factor. */
Return a new view zoomed in by the given factor.
Return a new view zoomed in by the given factor .
pub fn zoom(&self, factor: f64) -> ImageDims {
        let (c_x, c_y) = self.center();
        let (n_w, n_h) = (self.width / factor, self.height() / factor);
        let (n_x, n_y) = (c_x - n_w / 2.0, c_y + n_h / 2.0);
        ImageDims {
            xpix: self.xpix,
            ypix: self.ypix,
            x: n_x,
            y: n_y,
            width: n_w,
        }
    }
pub fn zoom ( & self , factor : f64 ) -> ImageDims { let ( c_x , c_y ) = self . center ( ) ; let ( n_w , n_h ) = ( self . width / factor , self . height ( ) / factor ) ; let ( n_x , n_y ) = ( c_x - n_w / 2.0 , c_y + n_h / 2.0 ) ; ImageDims { xpix : self . xpix , ypix : self . ypix , x : n_x , y : n_y , width : n_w , } }
Return a new view zoomed in by the given factor.
Return a new view zoomed in by the given factor .
&self
factor
f64