[][src]Struct screen_13::gpu::Render

pub struct Render { /* fields omitted */ }

A powerful structure which allows you to combine various operations and other render instances to create just about any creative effect.

Implementations

impl Render[src]

pub fn clear(&mut self) -> &mut ClearOp[src]

Clears the screen of all text and graphics.

pub fn copy(&mut self, src: &Texture2d) -> &mut CopyOp[src]

Copies the given texture onto this Render. The implementation uses a copy operation and is more efficient than write when there is no blending or fractional pixels.

pub fn dims(&self) -> Extent[src]

Gets the dimensions, in pixels, of this Render.

pub fn draw(&mut self) -> &mut DrawOp[src]

Draws a batch of 3D elements. There is no need to give any particular order to the individual commands and the implementation may sort and re-order them, so do not count on indices remaining the same after this call completes.

pub fn encode(&mut self) -> &mut EncodeOp[src]

Saves this Render as a JPEG file at the given path.

pub fn gradient<C>(&mut self, path: [(Coord, C); 2]) -> &mut EncodeOp where
    C: Copy + Into<AlphaColor>, 
[src]

Draws a linear gradient on this Render using the given path. TODO: Specialize for radial too?

pub fn text<C, P>(&mut self, pos: P, color: C) -> &mut FontOp where
    C: Into<AlphaColor>,
    P: Into<CoordF>, 
[src]

Draws bitmapped text on this Render using the given details. TODO: Accept a list of font/color/text/pos combos so we can batch many at once?

pub fn write(&mut self) -> &mut WriteOp[src]

Draws the given texture writes onto this Render. Note that the given texture writes will all be applied at once and there is no 'layering' of the individual writes going on - so if you need blending between writes you must submit a new batch.

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

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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.