Use skia matrix for internal data

This commit is contained in:
alonso.torres 2025-02-11 15:38:37 +01:00
parent 4594c7bf0a
commit 3dcabc9502
13 changed files with 228 additions and 211 deletions

View file

@ -249,7 +249,7 @@
offset (:offset stop)]
[r g b a (* 100 offset)]))
stops)))))
(h/call internal-module "_add_shape_fill_stops" stops-ptr n-stops))
(h/call internal-module "_add_shape_fill_stops"))
(some? image)
(let [id (dm/get-prop image :id)
@ -423,6 +423,34 @@
[opacity]
(h/call internal-module "_set_shape_opacity" (or opacity 1)))
(defn- translate-constraint-h
[type]
(case type
:left 0
:right 1
:leftright 2
:center 3
:scale 4))
(defn set-constraints-h
[constraint]
(when constraint
(h/call internal-module "_set_shape_constraint_h" (translate-constraint-h constraint))))
(defn- translate-constraint-v
[type]
(case type
:top 0
:bottom 1
:topbottom 2
:center 3
:scale 4))
(defn set-constraints-v
[constraint]
(when constraint
(h/call internal-module "_set_shape_constraint_v" (translate-constraint-v constraint))))
(defn set-shape-hidden
[hidden]
(h/call internal-module "_set_shape_hidden" hidden))