Struct adi_screen::Window
[−]
[src]
pub struct Window { /* fields omitted */ }
Window represents a connection to a display that can also recieve input.
Methods
impl Window
[src]
pub fn fog(&mut self, fog: Option<(f32, f32)>)
[src]
Update fog distance.
pub fn background(&mut self, rgb: (f32, f32, f32))
[src]
Set the background color of the window.
pub fn camera(&mut self, xyz: (f32, f32, f32), rotate_xyz: (f32, f32, f32))
[src]
Adjust the location and direction of the camera.
pub fn unit_size(&self) -> (f32, f32)
[src]
Get the minimal x and y dimension for a widget.
pub fn update(&mut self) -> Option<Input>
[src]
Update the window and return the user input. This should run in a
loop. Returns None
when done looping through input. After None
is returned, the next call will update the screen.
pub fn pulse_half_linear(&self, rate_spr: f32) -> f32
[src]
Returns a number between 0-1. This function is used for animations. It will take rate_spr seconds to go from 0 to 1.
pub fn pulse_full_linear(&self, rate_spr: f32) -> f32
[src]
Returns a number between 0-1. This function is used for animations. It will take rate_spr seconds to go from 0 to 1 and back to 0.
pub fn pulse_half_smooth(&self, rate_spr: f32) -> f32
[src]
Returns a number between 0-1. This function is used for animations. It will take rate_spr seconds to go from 0 to 1. It uses cosine underneath to make the animation look smooth, by making the beginning and end of the animation slower than the middle.
pub fn pulse_full_smooth(&self, rate_spr: f32) -> f32
[src]
Returns a number between 0-1. This function is used for animations. It will take rate_spr seconds to go from 0 to 1 and back to 0. It uses cosine underneath to make the animation look smooth, by making the beginning and end of the animation slower than the middle.
pub fn since(&self) -> f32
[src]
Get the time passed since the previous window frame.
pub fn fps(&self) -> (u16, bool)
[src]
Return the current number of FPS the window is running at.