lapce / floem

A native Rust UI library with fine-grained reactivity
https://lap.dev/floem/
MIT License
3.05k stars 133 forks source link

Add opacity to style and implement it as a renderer effect #684

Open jrmoulton opened 1 week ago

jrmoulton commented 1 week ago

add the ability to add opacity as a style and then implement opacity in each of the renderers.

It should be tracked in the paint context and should work with save/restore so that entire elements can be given a new opacity.

In vello, this can be implemented by pushing a new layer with the opacity. Tiny skia probably also has something built in to enable this. Vger might be tricky.