mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 05:57:21 +02:00
🎉 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:
parent
2ffb77cb4d
commit
6cbaacf1e0
6 changed files with 127 additions and 20 deletions
|
@ -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(_, _) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue