mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 22:17:25 +02:00
✨ Draw fills offscreen to support blend mode when multiple fills
This commit is contained in:
parent
3eb24e7f5f
commit
263d7eb313
3 changed files with 64 additions and 38 deletions
|
@ -79,23 +79,23 @@
|
|||
;; These values correspond to skia::BlendMode representation
|
||||
;; https://rust-skia.github.io/doc/skia_safe/enum.BlendMode.html
|
||||
(let [encoded-blend (case blend-mode
|
||||
:normal 3
|
||||
:darken 16
|
||||
:multiply 24
|
||||
:color-burn 19
|
||||
:lighten 17
|
||||
:screen 14
|
||||
:color-dodge 18
|
||||
:overlay 15
|
||||
:soft-light 21
|
||||
:hard-light 20
|
||||
:difference 22
|
||||
:exclusion 23
|
||||
:hue 25
|
||||
:saturation 26
|
||||
:color 27
|
||||
:luminosity 28
|
||||
3)]
|
||||
:normal 3
|
||||
:darken 16
|
||||
:multiply 24
|
||||
:color-burn 19
|
||||
:lighten 17
|
||||
:screen 14
|
||||
:color-dodge 18
|
||||
:overlay 15
|
||||
:soft-light 21
|
||||
:hard-light 20
|
||||
:difference 22
|
||||
:exclusion 23
|
||||
:hue 25
|
||||
:saturation 26
|
||||
:color 27
|
||||
:luminosity 28
|
||||
3)]
|
||||
(._set_shape_blend_mode ^js internal-module encoded-blend)))
|
||||
|
||||
(defn set-objects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue