Struct polystrip::Frame [−][src]
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]
context: Rc<Renderer>,
frame_idx: usize,
resources: T,
viewport: Viewport
) -> Frame<'a, T>
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]
&mut self,
shape: StrokedShape<'_>,
obj_transforms: &[Matrix4]
)
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]
&mut self,
shape: ColoredShape<'_>,
obj_transforms: &[Matrix4]
)
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]
&mut self,
shape: TexturedShape<'_>,
texture: &'a Texture,
obj_transforms: &[Matrix4]
)
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]
fn clone_context(&self) -> Rc<Renderer>
[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,
T: Unpin,
impl<'a, T> !UnwindSafe for Frame<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,