logo
pub struct GLItemRenderer { /* private fields */ }

Trait Implementations

Draws a rectangular shadow shape, which is usually placed underneath another rectangular shape with an offset (the drop-shadow-offset-x/y). The algorithm follows the HTML Canvas spec 4.12.5.1.18:

  • Create a new image to cache the shadow rendering
  • Fill the image with transparent “black”
  • Draw the (rounded) rectangle at shadow offset_x/offset_y
  • Blur the image
  • Fill the image with the shadow color and SourceIn as composition mode
  • Draw the shadow image

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) Read more

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

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

Return the internal renderer

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

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

Performs the conversion.

Performs the conversion.

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.