[][src]Function ggez::graphics::set_screen_coordinates

pub fn set_screen_coordinates(context: &mut Context, rect: Rect) -> GameResult

Sets the bounds of the screen viewport.

The default coordinate system has (0,0) at the top-left corner with X increasing to the right and Y increasing down, with the viewport scaled such that one coordinate unit is one pixel on the screen. This function lets you change this coordinate system to be whatever you prefer.

The Rect's x and y will define the top-left corner of the screen, and that plus its w and h will define the bottom-right corner.