Skip to content

Commit

Permalink
Dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed May 22, 2024
1 parent 7f4c0be commit 4f69068
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions renderers/opengl/renderer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,8 @@

(defmethod render-direct ((shape simple:filled-rectangle) renderer color)
(let* ((corner-radii (simple:corner-radii shape))
(round-p (loop for radius in corner-radii
thereis (/= 0 (alloy:to-px 0))))
(round-p (loop for radius across corner-radii
thereis (/= 0 (alloy:to-px radius))))
(extent (alloy:ensure-extent (simple:bounds shape))))
(flet ((prepare (shader)
(bind shader)
Expand Down
6 changes: 3 additions & 3 deletions renderers/simple/defaults.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
(setf (feather-radius shape) (alloy:px 0)))

(defmethod (setf feather-radius) ((value real) (shape filled-shape))
(setf (feather-radius shape) (alloy:px vvalue)))
(setf (feather-radius shape) (alloy:un value)))

(defclass outlined-shape (patterned-shape)
((line-width :initarg :line-width :initform (alloy:un 1) :accessor line-width)
Expand All @@ -108,7 +108,7 @@

(defclass rectangle (shape)
((bounds :initarg :bounds :initform (arg! :bounds) :accessor bounds)
(corner-radii :initform (make-array 4 :element-type T :initial-value (alloy:px 0)) :reader corner-radii)))
(corner-radii :initform (make-array 4 :initial-element (alloy:px 0)) :reader corner-radii)))

(defmethod shared-initialize :after ((rectangle rectangle) slots &key (corner-radii NIL corner-radii-p))
(when corner-radii-p
Expand Down Expand Up @@ -142,7 +142,7 @@
(fill (corner-radii rectangle) value))

(defmethod (setf corner-radii) ((value real) (rectangle rectangle))
(fill (corner-radii rectangle) (alloy:px value)))
(fill (corner-radii rectangle) (alloy:un value)))

(defmethod (setf corner-radii) ((null null) (rectangle rectangle))
(fill (corner-radii rectangle) (alloy:px 0)))
Expand Down

0 comments on commit 4f69068

Please sign in to comment.