Struct polystrip::Frame[][src]

pub struct Frame<'a, T: RenderDrop<'a>> { /* fields omitted */ }

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

Implementations

impl<'a, T: RenderDrop<'a>> Frame<'a, T>[src]

pub fn new(
    context: Rc<Renderer>,
    frame_idx: usize,
    resources: T,
    viewport: Viewport
) -> Frame<'a, T>
[src]

pub fn set_global_transform(&mut self, matrix: Matrix4)[src]

Sets the global transform matrix for draw calls after this method call.

If this method is called multiple times, draw calls will use the matrix provided most recently.

Draw calls made before this method call use the identity matrix as the global transform matrix.

pub fn draw_stroked(
    &mut self,
    shape: StrokedShape<'_>,
    obj_transforms: &[Matrix4]
)
[src]

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

pub fn draw_colored(
    &mut self,
    shape: ColoredShape<'_>,
    obj_transforms: &[Matrix4]
)
[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,
    obj_transforms: &[Matrix4]
)
[src]

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

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

Converts pixel coordinates to Gpu coordinates

Trait Implementations

impl<'a, T: RenderDrop<'a>> Drop for Frame<'a, T>[src]

impl<'a, T: RenderDrop<'a>> HasRenderer for Frame<'a, T>[src]

Auto Trait Implementations

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

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

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

impl<'a, T> Unpin for Frame<'a, T> where
    T: Unpin

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

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, 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.