Struct graphics_tree::GraphicsTree
source · pub struct GraphicsTree { /* private fields */ }
Expand description
A graphics backend that stores and optimizes commands
Implementations§
source§impl GraphicsTree
impl GraphicsTree
sourcepub fn new() -> GraphicsTree
pub fn new() -> GraphicsTree
Creates a new graphics tree.
sourcepub fn draw<F, T, G>(&self, texture_buffer: &mut TextureBuffer<F, T>, g: &mut G)
pub fn draw<F, T, G>(&self, texture_buffer: &mut TextureBuffer<F, T>, g: &mut G)
Draws graphics to backend.
Trait Implementations§
source§impl Graphics for GraphicsTree
impl Graphics for GraphicsTree
source§fn clear_color(&mut self, color: Color)
fn clear_color(&mut self, color: Color)
Clears background with a color. Read more
source§fn clear_stencil(&mut self, value: u8)
fn clear_stencil(&mut self, value: u8)
Clears stencil buffer with a value, usually 0. Read more
source§fn tri_list<F>(&mut self, draw_state: &DrawState, color: &Color, f: F)
fn tri_list<F>(&mut self, draw_state: &DrawState, color: &Color, f: F)
Renders list of 2d triangles using a solid color. Read more
source§fn tri_list_c<F>(&mut self, draw_state: &DrawState, f: F)
fn tri_list_c<F>(&mut self, draw_state: &DrawState, f: F)
Same as
tri_list
, but with individual vertex colors. Read moresource§fn tri_list_uv<F>(
&mut self,
draw_state: &DrawState,
color: &[f32; 4],
texture: &Self::Texture,
f: F
)
fn tri_list_uv<F>( &mut self, draw_state: &DrawState, color: &[f32; 4], texture: &Self::Texture, f: F )
Renders list of 2d triangles using a color and a texture. Read more
source§fn tri_list_uv_c<F>(
&mut self,
draw_state: &DrawState,
texture: &Self::Texture,
f: F
)
fn tri_list_uv_c<F>( &mut self, draw_state: &DrawState, texture: &Self::Texture, f: F )
Same as
tri_list_uv
, but with individual vertex colors. Read moresource§fn rectangle<R>(
&mut self,
r: &Rectangle,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn rectangle<R>( &mut self, r: &Rectangle, rectangle: R, draw_state: &DrawState, transform: [[f64; 3]; 2] )
Draws a rectangle. Read more
source§fn polygon(
&mut self,
p: &Polygon,
polygon: &[[f64; 2]],
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn polygon( &mut self, p: &Polygon, polygon: &[[f64; 2]], draw_state: &DrawState, transform: [[f64; 3]; 2] )
Draws a polygon. Read more
source§fn polygon_tween_lerp(
&mut self,
p: &Polygon,
polygons: &[&[[f64; 2]]],
tween_factor: f64,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn polygon_tween_lerp( &mut self, p: &Polygon, polygons: &[&[[f64; 2]]], tween_factor: f64, draw_state: &DrawState, transform: [[f64; 3]; 2] )
Draws a tweened polygon using linear interpolation. Read more
source§fn image(
&mut self,
image: &Image,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn image( &mut self, image: &Image, texture: &Self::Texture, draw_state: &DrawState, transform: [[f64; 3]; 2] )
Draws image. Read more
source§fn ellipse<R>(
&mut self,
e: &Ellipse,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn ellipse<R>( &mut self, e: &Ellipse, rectangle: R, draw_state: &DrawState, transform: [[f64; 3]; 2] )
Draws ellipse. Read more
Auto Trait Implementations§
impl Freeze for GraphicsTree
impl RefUnwindSafe for GraphicsTree
impl Send for GraphicsTree
impl Sync for GraphicsTree
impl Unpin for GraphicsTree
impl UnwindSafe for GraphicsTree
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more