[−][src]Struct polystrip::renderer::Frame
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
: TheTexturedShape
to be rendered.texture
: TheTexture
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>
Trait Implementations
impl<'a> Deref for Frame<'a>
[src]
impl<'a> FrameGeometryExt<'a> for Frame<'a>
[src]
fn draw_rect(&mut self, bounds: Rect, color: Color)
[src]
fn draw_texture(&mut self, x: i32, y: i32, texture: &'a Texture)
[src]
fn draw_texture_scaled(&mut self, destination: Rect, texture: &'a Texture)
[src]
fn draw_texture_cropped(
&mut self,
source: Rect,
x: i32,
y: i32,
texture: &'a Texture
)
[src]
&mut self,
source: Rect,
x: i32,
y: i32,
texture: &'a Texture
)
fn draw_texture_cropped_scaled(
&mut self,
source: Rect,
destination: Rect,
texture: &'a Texture
)
[src]
&mut self,
source: Rect,
destination: Rect,
texture: &'a Texture
)
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]
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> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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>,