pub struct Ember {
pub width: i32,
pub height: i32,
/* private fields */
}Fields§
§width: i32§height: i32Implementations§
Source§impl Ember
impl Ember
pub fn new(title: &str, width: i32, height: i32, fps: f32) -> Self
pub fn update(&mut self)
pub fn set_pixel(&mut self, x: i32, y: i32, color: u32)
pub fn draw_line(&mut self, x1: i32, y1: i32, x2: i32, y2: i32, color: u32)
pub fn draw_line_width( &mut self, x0: i32, y0: i32, x1: i32, y1: i32, width: i32, color: u32, )
pub fn draw_rectangle( &mut self, x: i32, y: i32, width: i32, height: i32, color: u32, )
pub fn draw_rectangle_fill( &mut self, x: i32, y: i32, width: i32, height: i32, color: u32, )
pub fn draw_circle(&mut self, x0: i32, y0: i32, radius: i32, color: u32)
pub fn draw_circle_fill(&mut self, x0: i32, y0: i32, radius: i32, color: u32)
pub fn draw_text(&mut self, text: &str, x: i32, y: i32, scale: i32, color: u32)
pub fn get_keys(&mut self) -> Vec<Key>
pub fn process_keys<F>(&mut self, f: F)
pub fn get_mouse_info(&self) -> MouseInfo
pub fn should_close(&mut self) -> bool
pub fn clear(&mut self)
pub fn clear_color(&mut self, color: u32)
Auto Trait Implementations§
impl Freeze for Ember
impl !RefUnwindSafe for Ember
impl !Send for Ember
impl !Sync for Ember
impl Unpin for Ember
impl !UnwindSafe for Ember
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