summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2022-12-14 12:53:28 -0500
committerDavid Thompson <dthompson2@worcester.edu>2022-12-14 12:57:02 -0500
commit0b1d3eeed88451c2c428de3d8904f21b4b1baade (patch)
tree561ba5838a088a4626e9393608fd227f83b13d04
parentdd16448a509ac58c18559305e2888087d4a3f623 (diff)
node-2d: Fix local bounding box fast path.
-rw-r--r--catbird/node-2d.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/catbird/node-2d.scm b/catbird/node-2d.scm
index dc561ba..a6a70bd 100644
--- a/catbird/node-2d.scm
+++ b/catbird/node-2d.scm
@@ -175,11 +175,11 @@
(= (vec2-y k) 0.0))
;; Fast path: Node is axis-aligned and bounding box
;; calculation is easy peasy.
- (let ((s (scale node)))
+ (let ((z (scale node)))
(set-rect-x! bb (- (vec2-x p) (vec2-x o)))
(set-rect-y! bb (- (vec2-y p) (vec2-y o)))
- (set-rect-width! bb (* (rect-width s) (vec2-x s)))
- (set-rect-height! bb (* (rect-height s) (vec2-y s))))
+ (set-rect-width! bb (* (rect-width s) (vec2-x z)))
+ (set-rect-height! bb (* (rect-height s) (vec2-y z))))
;; Slow path: Node is rotated, sheared, or both.
(let* ((m (local-matrix node))
(x0 0.0)