🎉 Feat masks

This commit is contained in:
AzazelN28 2025-01-22 16:41:25 +01:00 committed by Aitor Moreno
parent 3ea52a0198
commit f8d58cb74e
9 changed files with 249 additions and 102 deletions

View file

@ -108,7 +108,7 @@
(h/call internal-module "_set_shape_clip_content" clip-content))
(defn set-shape-type
[type]
[type {:keys [masked]}]
(cond
(= type :circle)
(h/call internal-module "_set_shape_kind_circle")
@ -119,6 +119,9 @@
(= type :bool)
(h/call internal-module "_set_shape_kind_bool")
(= type :group)
(h/call internal-module "_set_shape_kind_group" masked)
:else
(h/call internal-module "_set_shape_kind_rect")))
@ -537,6 +540,7 @@
(let [shape (nth shapes index)
id (dm/get-prop shape :id)
type (dm/get-prop shape :type)
masked (dm/get-prop shape :masked-group)
selrect (dm/get-prop shape :selrect)
clip-content (if (= type :frame)
(not (dm/get-prop shape :show-content))
@ -563,7 +567,7 @@
shadows (dm/get-prop shape :shadow)]
(use-shape id)
(set-shape-type type)
(set-shape-type type {:masked masked})
(set-shape-clip-content clip-content)
(set-shape-selrect selrect)
(set-shape-rotation rotation)