Struct glitter::types::Viewport
[−]
[src]
pub struct Viewport { pub x: u32, pub y: u32, pub width: u32, pub height: u32, }
An OpenGL viewport, with an origin and size, with integer components.
Fields
x: u32
The X coordinate of the viewport's origin
y: u32
The Y coordinate of the viewport's origin
width: u32
The viewport's width
height: u32
The viewport's height
Methods
impl Viewport
[src]
fn new(x: u32, y: u32, width: u32, height: u32) -> Self
Create a new viewport, with the given X and Y coordinates as the origin and the given width and height as the size.
Trait Implementations
impl Clone for Viewport
[src]
fn clone(&self) -> Viewport
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more