fn update_window_transform(&mut self) -> Transform2D {
        // Fetch the window tranform from the canvas, and invert it to get the transform from window coordinates to canvas coordinates
        let window_transform    = self.renderer.get_window_transform().invert().unwrap();

        // Window coordinates are inverted compared to canvas coordinates
        let window_transform    = Transform2D::scale(1.0, -1.0) * window_transform;
        let window_transform    = window_transform * Transform2D::translate(0.0, -self.height as _);

        // Update the value of the transform in the state
        self.window_transform   = Some(window_transform);
        window_transform
    }
///
/// Updates the window transform for this state
///
Updates the window transform for this state
Updates the window transform for this state
fn update_window_transform(&mut self) -> Transform2D {
        // Fetch the window tranform from the canvas, and invert it to get the transform from window coordinates to canvas coordinates
        let window_transform    = self.renderer.get_window_transform().invert().unwrap();
        // Window coordinates are inverted compared to canvas coordinates
        let window_transform    = Transform2D::scale(1.0, -1.0) * window_transform;
        let window_transform    = window_transform * Transform2D::translate(0.0, -self.height as _);
        // Update the value of the transform in the state
        self.window_transform   = Some(window_transform);
        window_transform
    }
fn update_window_transform ( & mut self ) -> Transform2D { // Fetch the window tranform from the canvas, and invert it to get the transform from window coordinates to canvas coordinates let window_transform = self . renderer . get_window_transform ( ) . invert ( ) . unwrap ( ) ; // Window coordinates are inverted compared to canvas coordinates let window_transform = Transform2D :: scale ( 1.0 , - 1.0 ) * window_transform ; let window_transform = window_transform * Transform2D :: translate ( 0.0 , - self . height as _ ) ; // Update the value of the transform in the state self . window_transform = Some ( window_transform ) ; window_transform }
Updates the window transform for this state
Updates the window transform for this state
&mut self