[][src]Trait iced::widget::canvas::Layer

pub trait Layer: Debug {
    fn draw(&self, bounds: Size) -> Arc<Primitive>;
}
This is supported on feature="canvas" only.

A layer that can be presented at a Canvas.

Required methods

fn draw(&self, bounds: Size) -> Arc<Primitive>

This is supported on feature="canvas" only.

Draws the Layer in the given bounds and produces a Primitive as a result.

The Layer may choose to store the produced Primitive locally and only recompute it when the bounds change, its contents change, or is otherwise explicitly cleared by other means.

Loading content...

Implementors

Loading content...