/**
    Return a new view with the center at new specified position:
    `x_frac` of the way across the image, `y_frac` of the way down it.
    */
Return a new view with the center at new specified position:
`x_frac` of the way across the image, `y_frac` of the way down it.
Return a new view with the center at new specified position : ` x_frac ` of the way across the image ` y_frac ` of the way down it .
pub fn recenter(&self, x_frac: f64, y_frac: f64) -> ImageDims {
        let (xof, yof) = (x_frac - 0.5, y_frac - 0.5);
        let (xo, yo) = (xof * self.width, yof * self.height());
        let (nx, ny) = (self.x + xo, self.y - yo);
        ImageDims {
            xpix: self.xpix,
            ypix: self.ypix,
            x: nx,
            y: ny,
            width: self.width,
        }
    }
pub fn recenter ( & self , x_frac : f64 , y_frac : f64 ) -> ImageDims { let ( xof , yof ) = ( x_frac - 0.5 , y_frac - 0.5 ) ; let ( xo , yo ) = ( xof * self . width , yof * self . height ( ) ) ; let ( nx , ny ) = ( self . x + xo , self . y - yo ) ; ImageDims { xpix : self . xpix , ypix : self . ypix , x : nx , y : ny , width : self . width , } }
Return a new view with the center at new specified position:
`x_frac` of the way across the image, `y_frac` of the way down it.
Return a new view with the center at new specified position : ` x_frac ` of the way across the image ` y_frac ` of the way down it .
&self
x_frac
f64
y_frac
f64