          :y1 (+ (:y1 shape) dy)
          :x2 (+ (:x2 shape) dx)
          :y2 (+ (:y2 shape) dy)))
+
+(defmethod -move :default
+  [shape _]
+  (throw (ex-info "Not implemented" (select-keys shape [:type]))))
 
 (defmethod -rotate ::shape
   [shape rotation]


(def ^:static +hierarchy+
  (as-> (make-hierarchy) $
    (derive $ :builtin/icon ::shape)
    (derive $ :builtin/rect ::shape)
    (derive $ :builtin/line ::shape)
    (derive $ :builtin/circle ::shape)
    (derive $ :builtin/text ::shape)
    (derive $ :builtin/group ::shape)))

(defn shape?
  [type]

  [shape _]
  (throw (ex-info "Not implemented" (select-keys shape [:type]))))

(defmethod -resize' ::rect
  [shape [width height]]
  (merge shape
         (when width {:width width})
         (when height {:height height})))

(defmethod -resize' :default
  [shape _]
  (throw (ex-info "Not implemented" (select-keys shape [:type]))))

;; Move

(defmethod -move ::rect
  [shape {:keys [dx dy] :as opts}]
  (assoc shape
         :x (+ (:x shape) dx)
         :y (+ (:y shape) dy)))

(defmethod -move :builtin/line
  [shape {:keys [dx dy] :as opts}]
