[][src]Struct polystrip::renderer::Frame

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

A frame to be drawn to. The frame gets presented on drop.

Since a Frame borrows the Renderer it was created for, any functions which would normally be called on a &Renderer must be called on the Frame, which implements Deref<Target = Renderer>.

More methods are implemented in the FrameGeometryExt trait.

Implementations

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

pub fn draw_colored(&mut self, shape: ColoredShape<'_>)[src]

Draws a ColoredShape. The shape will be drawn in front of any shapes drawn before it.

pub fn draw_textured(&mut self, shape: TexturedShape<'_>, texture: &'a Texture)[src]

Draws a TexturedShape. The shape will be drawn in front of any shapes drawn before it.

Arguments

  • shape: The TexturedShape to be rendered.
  • texture: The Texture to be drawn to the geometry of the shape.

pub fn draw_shape_set(&mut self, set: ShapeSet<'a>)[src]

Draws a ShapeSet. All shapes in the set will be drawn in front of shapes drawn before the set. The render order of shapes in the set is unspecified.

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

Clears the entire frame with the specified color, setting every pixel to its value.

Methods from Deref<Target = Renderer>

pub fn pixel(&self, x: i32, y: i32) -> GpuPos[src]

Converts pixel coordinates to Gpu coordinates

Trait Implementations

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

type Target = Renderer

The resulting type after dereferencing.

impl<'a> FrameGeometryExt<'a> 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> Instrument for T[src]

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

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.