iced_graphics::layer

Trait Layer

source
pub trait Layer: Default {
    // Required methods
    fn with_bounds(bounds: Rectangle) -> Self;
    fn flush(&mut self);
    fn resize(&mut self, bounds: Rectangle);
    fn reset(&mut self);
}
Expand description

A layer of graphical primitives.

Layers normally dictate a set of primitives that are rendered in a specific order.

Required Methods§

source

fn with_bounds(bounds: Rectangle) -> Self

Creates a new Layer with the given bounds.

source

fn flush(&mut self)

Flushes and settles any pending group of primitives in the Layer.

This will be called when a Layer is finished. It allows layers to efficiently record primitives together and defer grouping until the end.

source

fn resize(&mut self, bounds: Rectangle)

Resizes the Layer to the given bounds.

source

fn reset(&mut self)

Clears all the layers contents and resets its bounds.

Object Safety§

This trait is not object safe.

Implementors§