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_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 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
sourcefn line<L>(
&mut self,
l: &Line,
line: L,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
L: Into<[f64; 4]>,
fn line<L>(
&mut self,
l: &Line,
line: L,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
L: Into<[f64; 4]>,
Draws line. Read more
sourcefn circle_arc<R>(
&mut self,
c: &CircleArc,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
fn circle_arc<R>(
&mut self,
c: &CircleArc,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
Draws circle arc. Read more
sourcefn deform_image(
&mut self,
d: &DeformGrid,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn deform_image(
&mut self,
d: &DeformGrid,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
Draws deformed image. 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
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.