Struct graphics_tree::GraphicsTree
source · pub struct GraphicsTree { /* private fields */ }
Expand description
A graphics backend that stores and optimizes commands
Implementations
sourceimpl 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)where
T: ImageSize + CreateTexture<F>,
G: Graphics<Texture = T>,
pub fn draw<F, T, G>(&self, texture_buffer: &mut TextureBuffer<F, T>, g: &mut G)where
T: ImageSize + CreateTexture<F>,
G: Graphics<Texture = T>,
Draws graphics to backend.
Trait Implementations
sourceimpl Graphics for GraphicsTree
impl Graphics for GraphicsTree
sourcefn clear_color(&mut self, color: Color)
fn clear_color(&mut self, color: Color)
Clears background with a color. Read more
sourcefn clear_stencil(&mut self, value: u8)
fn clear_stencil(&mut self, value: u8)
Clears stencil buffer with a value, usually 0. Read more
sourcefn tri_list<F>(&mut self, draw_state: &DrawState, color: &Color, f: F)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]])),
fn tri_list<F>(&mut self, draw_state: &DrawState, color: &Color, f: F)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]])),
Renders list of 2d triangles using a solid color. Read more
sourcefn tri_list_c<F>(&mut self, draw_state: &DrawState, f: F)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 4]])),
fn tri_list_c<F>(&mut self, draw_state: &DrawState, f: F)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 4]])),
Same as
tri_list
, but with individual vertex colors. Read moresourcefn tri_list_uv<F>(
&mut self,
draw_state: &DrawState,
color: &[f32; 4],
texture: &Self::Texture,
f: F
)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]])),
fn tri_list_uv<F>(
&mut self,
draw_state: &DrawState,
color: &[f32; 4],
texture: &Self::Texture,
f: F
)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]])),
Renders list of 2d triangles using a color and a texture. Read more
sourcefn tri_list_uv_c<F>(
&mut self,
draw_state: &DrawState,
texture: &Self::Texture,
f: F
)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]], &[[f32; 4]])),
fn tri_list_uv_c<F>(
&mut self,
draw_state: &DrawState,
texture: &Self::Texture,
f: F
)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]], &[[f32; 4]])),
Same as
tri_list_uv
, but with individual vertex colors. Read moresourcefn rectangle<R>(
&mut self,
r: &Rectangle,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
fn rectangle<R>(
&mut self,
r: &Rectangle,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
Draws a rectangle. Read more
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn ellipse<R>(
&mut self,
e: &Ellipse,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
fn ellipse<R>(
&mut self,
e: &Ellipse,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
Draws ellipse. Read more
Auto Trait Implementations
impl RefUnwindSafe for GraphicsTree
impl Send for GraphicsTree
impl Sync for GraphicsTree
impl Unpin for GraphicsTree
impl UnwindSafe for GraphicsTree
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more