[][src]Struct egaku2d::WindowedSystem

pub struct WindowedSystem { /* fields omitted */ }

A version where the user can control the size of the window.

Methods

impl WindowedSystem[src]

pub fn new(
    dim: [usize; 2],
    events_loop: &EventLoop<()>,
    title: &str
) -> WindowedSystem
[src]

pub fn set_viewport_from_width(&mut self, width: f32)[src]

pub fn set_viewport_min(&mut self, d: f32)[src]

pub fn set_viewport_from_height(&mut self, height: f32)[src]

pub fn get_dim(&self) -> [usize; 2][src]

pub fn texture(&mut self, file: &str, grid_dim: [u8; 2]) -> ImageResult<Texture>[src]

Creates a new texture from the specified file. The fact that we need a mutable reference to this object Ensures that we make the texture in the same thread. The grid dimensions passed are the tile dimensions is the texture is a tile set.

pub fn canvas(&self) -> &SimpleCanvas[src]

pub fn canvas_mut(&mut self) -> &mut SimpleCanvas[src]

pub fn swap_buffers(&mut self)[src]

Trait Implementations

impl Drop for WindowedSystem[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.