Struct conrod::render::Primitives
[−]
[src]
pub struct Primitives<'a> { /* fields omitted */ }
An iterator-like type that yields a reference to each primitive in order of depth for rendering.
This type is produced by the Ui::draw
and Ui::draw_if_changed
methods.
This type borrows data from the Ui
in order to lazily produce each Primitive
. If you
require ownership over the sequence of primitives, consider using the OwnedPrimitives
type.
The OwnedPrimitives
type can be produced by calling the Primitives::owned
method.
Methods
impl<'a> Primitives<'a>
[src]
fn new(
graph: &'a Graph,
depth_order: &'a [Id],
theme: &'a Theme,
fonts: &'a Map,
window_dim: Dimensions
) -> Self
graph: &'a Graph,
depth_order: &'a [Id],
theme: &'a Theme,
fonts: &'a Map,
window_dim: Dimensions
) -> Self
Constructor for the Primitives
iterator.
fn next(&mut self) -> Option<Primitive>
Yield the next Primitive
for rendering.
fn owned(self) -> OwnedPrimitives
Collect the Primitives
list into an owned collection.
This is useful for sending Ui
rendering data across threads in an efficient manner.
Trait Implementations
impl<'a> PrimitiveWalker for Primitives<'a>
[src]
fn next_primitive(&mut self) -> Option<Primitive>
Yield the next Primitive
in order of depth, bottom to top.