From 1b759d77716755f3400e1691af8396c59cf0a0f6 Mon Sep 17 00:00:00 2001 From: BirDt_ Date: Fri, 17 Apr 2026 19:25:42 +0800 Subject: [PATCH] Nicer rendering interface --- samples/bounce.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/samples/bounce.scm b/samples/bounce.scm index 904b70d..a52e285 100644 --- a/samples/bounce.scm +++ b/samples/bounce.scm @@ -23,15 +23,15 @@ (push-render-object 'screen (visual-2d-layer vis-2d) (lambda () - ((if (circle-2d-filled? circle) - draw-circle - draw-circle-lines) - (inexact->exact (round (+ (vector-x (position transform)) - (vector-x (circle-2d-center circle))))) - (inexact->exact (round (+ (vector-y (position transform)) - (vector-y (circle-2d-center circle))))) - (circle-2d-radius circle) - (use-color (visual-2d-color vis-2d)))))))))) + (let ((draw-pos (+ (position transform) + (circle-2d-center circle)))) + ((if (circle-2d-filled? circle) + draw-circle + draw-circle-lines) + (vector-x draw-pos) + (vector-y draw-pos) + (circle-2d-radius circle) + (visual-2d-color vis-2d)))))))))) (define-record-type