mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 23:21:43 +02:00
🎉 Add full integration with path data type feature
This commit is contained in:
parent
f545d7b3ea
commit
1fc0203c38
64 changed files with 2622 additions and 2237 deletions
|
@ -10,8 +10,8 @@
|
|||
["react-dom/server" :as rds]
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.types.path :as path]
|
||||
[app.common.types.shape.layout :as ctl]
|
||||
[app.common.types.shape.path :as path]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cf]
|
||||
[app.main.fonts :as fonts]
|
||||
|
@ -309,13 +309,14 @@
|
|||
(h/call wasm/internal-module "stringToUTF8" str offset size)
|
||||
(h/call wasm/internal-module "_set_shape_path_attrs" (count attrs))))
|
||||
|
||||
;; FIXME: revisit on heap refactor is merged to use u32 instead u8
|
||||
(defn set-shape-path-content
|
||||
[content]
|
||||
(let [pdata (path/path-data content)
|
||||
size (* (count pdata) path/SEGMENT-BYTE-SIZE)
|
||||
(let [pdata (path/content content)
|
||||
size (path/get-byte-size content)
|
||||
offset (mem/alloc-bytes size)
|
||||
heap (mem/get-heap-u8)]
|
||||
(path/-write-to pdata (.-buffer heap) offset)
|
||||
(path/write-to pdata (.-buffer heap) offset)
|
||||
(h/call wasm/internal-module "_set_shape_path_content")))
|
||||
|
||||
(defn set-shape-svg-raw-content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue