logo
pub struct RenderEvent {
    pub layer: Option<PaintLayer>,
    pub callback: Box<dyn Fn(&RECT, &[u8])>,
}
Expand description

Events for rendering UI to a bitmap.

Fields

layer: Option<PaintLayer>

Which layer to render (or the whole document if None).

callback: Box<dyn Fn(&RECT, &[u8])>

The callback that receives a rendered bitmap.

The first argument contains a rectangle with the coordinates (position and size) of the rendered bitmap.

The second ardument is the rendered bitmap in the BGRA form. The size of the bitmap equals to width * height * 4.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.