Struct simple_pixels::Context
source · pub struct Context<'a> { /* private fields */ }Implementations§
source§impl<'a> Context<'a>
impl<'a> Context<'a>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn dpi_scale(&self) -> f32
pub fn screen_size(&self) -> (f32, f32)
pub fn delta_time(&self) -> Duration
pub fn clear_color(&mut self, color: RGBA8)
pub fn get_key_state(&self, key: KeyCode) -> Option<InputState>
pub fn is_key_down(&self, key: KeyCode) -> bool
pub fn is_key_pressed(&self, key: KeyCode) -> bool
pub fn is_key_released(&self, key: KeyCode) -> bool
pub fn get_key_mods(&self) -> KeyMods
pub fn get_mouse_pos(&self) -> (f32, f32)
pub fn get_mouse_pos_int(&self) -> (i32, i32)
pub fn quit(&mut self)
pub fn show_mouse(&mut self, shown: bool)
pub fn set_fullscreen(&mut self, fullscreen: bool)
pub fn get_clipboard(&mut self) -> Option<String>
pub fn set_clipboard(&mut self, data: &str)
pub fn clear(&mut self)
pub fn draw_pixel(&mut self, x: u32, y: u32, color: RGBA8)
pub fn draw_rect( &mut self, x: u32, y: u32, width: u32, height: u32, color: RGBA8 )
pub fn draw_pixels( &mut self, x: u32, y: u32, width: u32, height: u32, pixels: &[RGBA8] )
pub fn draw_screen(&mut self, pixels: &[RGBA8])
pub fn get_draw_buffer(&self) -> &[RGBA8]
pub fn get_mut_draw_buffer(&mut self) -> &mut [RGBA8]
pub fn set_filter_mode(&mut self, filter: FilterMode)
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more