Struct sixtyfps_rendering_backend_gl::GLItemRenderer [−][src]
pub struct GLItemRenderer { /* fields omitted */ }
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
fn draw_cached_pixmap(
&mut self,
item_cache: &CachedRenderingData,
update_fn: &dyn Fn(&mut dyn FnMut(u32, u32, &[u8]))
)
fn draw_cached_pixmap(
&mut self,
item_cache: &CachedRenderingData,
update_fn: &dyn Fn(&mut dyn FnMut(u32, u32, &[u8]))
)
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
Apply the opacity (between 0 and 1) for all following items until the next call to restore_state.