mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 04:08:24 +02:00
✨ Incremental area selection
This commit is contained in:
parent
3a64efd136
commit
55d2acdf13
9 changed files with 41 additions and 22 deletions
|
@ -208,3 +208,4 @@
|
|||
(d/export gin/overlaps?)
|
||||
(d/export gin/has-point?)
|
||||
(d/export gin/has-point-rect?)
|
||||
(d/export gin/rect-contains-shape?)
|
||||
|
|
|
@ -302,3 +302,9 @@
|
|||
(let [lines (points->lines (:points shape))]
|
||||
;; TODO: Will only work for simple shapes
|
||||
(is-point-inside-evenodd? point lines)))
|
||||
|
||||
(defn rect-contains-shape?
|
||||
[rect shape]
|
||||
(->> shape
|
||||
:points
|
||||
(every? (partial has-point-rect? rect))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue