[][src]Struct coffee::graphics::Frame

pub struct Frame<'a> { /* fields omitted */ }

The next frame of your game.

You can only get a Frame by using Window::frame.

This type is useful to define explicit rendering function signatures. If a function should never render off-screen, consider taking a Frame as an argument instead of a generic Target.

Implementations

impl<'a> Frame<'a>[src]

pub fn gpu(&mut self) -> &mut Gpu[src]

Get the Gpu linked to the Window of this Frame.

pub fn width(&self) -> f32[src]

Get the width of the frame.

pub fn height(&self) -> f32[src]

Get the height of the frame.

pub fn as_target(&mut self) -> Target[src]

See the frame as a Target.

You will need to use this in order to render some resources to it.

pub fn clear(&mut self, color: Color)[src]

Clear the frame with the given Color.

Trait Implementations

impl<'a> Debug for Frame<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Frame<'a>

impl<'a> !Send for Frame<'a>

impl<'a> !Sync for Frame<'a>

impl<'a> Unpin for Frame<'a>

impl<'a> !UnwindSafe for Frame<'a>

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> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,