Avoid consing up a fresh 1x1 rectangle each time

This commit is contained in:
Tony Garnock-Jones 2016-09-05 11:22:01 +01:00
parent 550bb12c4a
commit 497b63699c
1 changed files with 2 additions and 1 deletions

View File

@ -108,6 +108,7 @@
(stop-when (message (trace-notification _ pid 'exit _)))))
(define 1x1-white-rectangle (rectangle 1 1 "solid" "white"))
(define (compute-link-line start-pos end-pos width)
(define delta (- end-pos start-pos))
(define heading (angle delta))
@ -119,7 +120,7 @@
(imag-part (+ start-pos displacement))
(magnitude delta)
width
(rectangle 1 1 "solid" "white"))))
1x1-white-rectangle)))
(define (spawn-influence-view-factory)
(actor #:name 'influence-view-factory