Struct sfml::window::VideoMode
[−]
[src]
pub struct VideoMode { pub width: u32, pub height: u32, pub bits_per_pixel: u32, }
VideoMode defines a video mode (width, height, bpp, frequency)
Provides functions for getting modes supported by the display device
Fields
width: u32
Video mode width, in pixels.
height: u32
Video mode height, in pixels.
bits_per_pixel: u32
Video mode pixel depth, in bits per pixels.
Methods
impl VideoMode
[src]
fn new() -> VideoMode
Default constructor for class VideoMode.
Return a new VideoMode
fn new_init(width: u32, height: u32, bits_per_pixel: u32) -> VideoMode
Constructor with parameters for class VideoMode.
Return a new VideoMode initialized
fn is_valid(&self) -> bool
Tell whether or not a video mode is valid
The validity of video modes is only relevant when using fullscreen windows; otherwise any video mode can be used with no restriction.
return true if the video mode is valid for fullscreen mode
fn get_desktop_mode() -> VideoMode
Static Method, get the current desktop video mode
return the urrent desktop video mode
fn get_fullscreen_modes() -> Option<Vec<VideoMode>>
Static Method, retrieve all the video modes supported in fullscreen mode
When creating a fullscreen window, the video mode is restricted to be compatible with what the graphics driver and monitor support. This function returns the complete list of all video modes that can be used in fullscreen mode. The returned array is sorted from best to worst, so that the first element will always give the best mode (higher width, height and bits_per_pixel).
Return a vector containing all the supported VideoMode
Trait Implementations
impl Copy for VideoMode
[src]
impl Debug for VideoMode
[src]
impl Ord for VideoMode
[src]
fn cmp(&self, __arg_0: &VideoMode) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for VideoMode
[src]
fn partial_cmp(&self, __arg_0: &VideoMode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &VideoMode) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &VideoMode) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &VideoMode) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &VideoMode) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for VideoMode
[src]
impl PartialEq for VideoMode
[src]
fn eq(&self, __arg_0: &VideoMode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &VideoMode) -> bool
This method tests for !=
.
impl Clone for VideoMode
[src]
fn clone(&self) -> VideoMode
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