🎉 Implement inner shadows (wasm) (#5767)

* 🎉 Implement inner shadows (wasm)

* 🐛 Fix reset canvas problem

---------

Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
This commit is contained in:
Belén Albeza 2025-02-14 13:46:30 +01:00 committed by GitHub
parent 2ffb77cb4d
commit 6cbaacf1e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 127 additions and 20 deletions

View file

@ -399,6 +399,12 @@ impl Shape {
.filter(|shadow| shadow.style() == ShadowStyle::Drop)
}
pub fn inner_shadows(&self) -> impl DoubleEndedIterator<Item = &Shadow> {
self.shadows
.iter()
.filter(|shadow| shadow.style() == ShadowStyle::Inner)
}
pub fn to_path_transform(&self) -> Option<skia::Matrix> {
match self.kind {
Kind::Path(_) | Kind::Bool(_, _) => {