From 749a5a306deacd5c481ecc4c53b7f03178c3e335 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 30 Jun 2022 10:05:21 -0500 Subject: [add] button unit and [example]; [modify] scale-by is now defun --- src/core/affine.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/affine.lisp') diff --git a/src/core/affine.lisp b/src/core/affine.lisp index 4585a81..7c87d16 100644 --- a/src/core/affine.lisp +++ b/src/core/affine.lisp @@ -17,10 +17,10 @@ -(defmethod scale-by ((affine affine) amount) - (with-slots (scale-x scale-y) affine - (setf scale-x (* amount scale-x) - scale-y (* amount scale-y)))) +(defun scale-by (affine amount) + (with-accessors ((sx scale-x) (sy scale-y)) affine + (setf sx (* amount sx) + sy (* amount sy)))) (defun set-width-preserve-aspect (affine new-width) (scale-by affine (/ new-width (width affine)))) -- cgit v1.2.3