logo
pub struct PartialRenderer<'a, T> {
    pub dirty_region: DirtyRegion,
    pub actual_renderer: T,
    /* private fields */
}
Expand description

Put this structure in the renderer to help with partial rendering

Fields

dirty_region: DirtyRegion

The region of the screen which is considered dirty and that should be repainted

actual_renderer: T

The actual renderer which the drawing call will be forwarded to

Implementations

Create a new PartialRenderer

Visit the tree of item and compute what are the dirty regions

Move the actual renderer

Trait Implementations

This is called before it is being rendered (before the draw_* function). Returns Read more

Clip the further call until restore_state. radius/border_width can be used for border rectangle clip. (FIXME: consider removing radius/border_width and have another function that take a path instead) Returns a boolean indicating the state of the new clip region: true if the clip region covers an area; false if the clip region is empty. Read more

Get the current clip bounding box in the current transformed coordinate.

Apply the opacity (between 0 and 1) for all following items until the next call to restore_state.

Returns the scale factor

Draw a pixmap in position indicated by the pos. The pixmap will be taken from cache if the cache is valid, otherwise, update_fn will be called with a callback that need to be called once with fn (width, height, data) where data are the RGBA premultiplied pixel values Read more

Draw the given string with the specified color at current (0, 0) with the default font. Mainly used by the performance counter overlay. Read more

Return the internal renderer

Returns any rendering metrics collecting since the creation of the renderer (typically per frame) 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.