Struct solstice_2d::DrawList
source · pub struct DrawList<'a> { /* private fields */ }
Implementations§
source§impl<'a> DrawList<'a>
impl<'a> DrawList<'a>
pub fn new() -> Self
pub fn new_from_state<'b>(other: &DrawList<'_>) -> DrawList<'b>
pub fn append(&mut self, other: &mut Self)
pub fn clear<C: Into<Color>>(&mut self, color: C)
pub fn print<T>(&mut self, text: T, font_id: FontId, scale: f32, bounds: Rectangle)where
T: Into<Cow<'a, str>>,
pub fn print_with_layout<T>(
&mut self,
text: T,
font_id: FontId,
scale: f32,
bounds: Rectangle,
layout: PrintLayout
)where
T: Into<Cow<'a, str>>,
pub fn line_2d<G>(&mut self, points: G)where
G: Into<Cow<'a, [LineVertex]>>,
pub fn line_3d<G>(&mut self, points: G)where
G: Into<Cow<'a, [LineVertex]>>,
pub fn set_color<C: Into<Color>>(&mut self, color: C)
pub fn set_transform<T: Into<ColumnMatrix4<f32>>>(&mut self, transform: T)
pub fn set_line_width(&mut self, line_width: f32)
pub fn set_camera<T: Into<Transform3D>>(&mut self, camera: T)
pub fn set_projection_mode(&mut self, projection_mode: Option<Projection>)
pub fn set_canvas(&mut self, target: Option<Canvas>)
pub fn set_shader(&mut self, shader: Option<Shader>)
Trait Implementations§
source§impl<'a, G> Draw<Vertex2D, G> for DrawList<'a>where
G: GeometryKind<'a, Vertex2D> + 'a,
impl<'a, G> Draw<Vertex2D, G> for DrawList<'a>where
G: GeometryKind<'a, Vertex2D> + 'a,
fn draw(&mut self, geometry: G)
fn draw_with_transform<TX>(&mut self, geometry: G, transform: TX)where
TX: Into<ColumnMatrix4<f32>>,
fn draw_with_color<C: Into<Color>>(&mut self, geometry: G, color: C)
fn draw_with_color_and_transform<C, TX>(
&mut self,
geometry: G,
color: C,
transform: TX
)where
C: Into<Color>,
TX: Into<ColumnMatrix4<f32>>,
fn image<T: Texture>(&mut self, geometry: G, texture: T)
fn image_with_color<T, C>(&mut self, geometry: G, texture: T, color: C)where
T: Texture,
C: Into<Color>,
fn image_with_transform<T, TX>(&mut self, geometry: G, texture: T, transform: TX)where
T: Texture,
TX: Into<ColumnMatrix4<f32>>,
fn image_with_color_and_transform<T, C, TX>(
&mut self,
geometry: G,
texture: T,
color: C,
transform: TX
)where
T: Texture,
C: Into<Color>,
TX: Into<ColumnMatrix4<f32>>,
source§impl<'a, G> Draw<Vertex3D, G> for DrawList<'a>where
G: GeometryKind<'a, Vertex3D> + 'a,
impl<'a, G> Draw<Vertex3D, G> for DrawList<'a>where
G: GeometryKind<'a, Vertex3D> + 'a,
fn draw(&mut self, geometry: G)
fn draw_with_transform<TX>(&mut self, geometry: G, transform: TX)where
TX: Into<ColumnMatrix4<f32>>,
fn draw_with_color<C: Into<Color>>(&mut self, geometry: G, color: C)
fn draw_with_color_and_transform<C, TX>(
&mut self,
geometry: G,
color: C,
transform: TX
)where
C: Into<Color>,
TX: Into<ColumnMatrix4<f32>>,
fn image<T: Texture>(&mut self, geometry: G, texture: T)
fn image_with_color<T, C>(&mut self, geometry: G, texture: T, color: C)where
T: Texture,
C: Into<Color>,
fn image_with_transform<T, TX>(&mut self, geometry: G, texture: T, transform: TX)where
T: Texture,
TX: Into<ColumnMatrix4<f32>>,
fn image_with_color_and_transform<T, C, TX>(
&mut self,
geometry: G,
texture: T,
color: C,
transform: TX
)where
T: Texture,
C: Into<Color>,
TX: Into<ColumnMatrix4<f32>>,
source§impl<'a, G> Stroke<Vertex2D, G> for DrawList<'a>where
G: Into<Geometry<'a, Vertex2D>>,
impl<'a, G> Stroke<Vertex2D, G> for DrawList<'a>where
G: Into<Geometry<'a, Vertex2D>>,
fn stroke(&mut self, geometry: G)
fn stroke_with_transform<TX>(&mut self, geometry: G, transform: TX)where
TX: Into<ColumnMatrix4<f32>>,
fn stroke_with_color<C: Into<Color>>(&mut self, geometry: G, color: C)
fn stroke_with_color_and_transform<C, TX>(
&mut self,
geometry: G,
color: C,
transform: TX
)where
C: Into<Color>,
TX: Into<ColumnMatrix4<f32>>,
source§impl<'a, G> Stroke<Vertex3D, G> for DrawList<'a>where
G: Into<Geometry<'a, Vertex3D>>,
impl<'a, G> Stroke<Vertex3D, G> for DrawList<'a>where
G: Into<Geometry<'a, Vertex3D>>,
fn stroke(&mut self, geometry: G)
fn stroke_with_transform<TX>(&mut self, geometry: G, transform: TX)where
TX: Into<ColumnMatrix4<f32>>,
fn stroke_with_color<C: Into<Color>>(&mut self, geometry: G, color: C)
fn stroke_with_color_and_transform<C, TX>(
&mut self,
geometry: G,
color: C,
transform: TX
)where
C: Into<Color>,
TX: Into<ColumnMatrix4<f32>>,
Auto Trait Implementations§
impl<'a> RefUnwindSafe for DrawList<'a>
impl<'a> Send for DrawList<'a>
impl<'a> Sync for DrawList<'a>
impl<'a> Unpin for DrawList<'a>
impl<'a> UnwindSafe for DrawList<'a>
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.