How do I effeciently move a line?

From: Kevin K. Lewis <>
Date: Fri, 26 Jul 1996 07:09:23 -0500

I have two draggable objects, with a line connecting them. Whenever
either of the objects is moved, I must redraw the line.

Currently I do this by destroying the old line and drawing a new one.
However, this is very inefficient.

(define draw-line
  (lambda (object-1 object-2)
    (make <Line> :parent (parent-of object-1)
          :coords (append (head-of object-1)
                          (tail-of object-2))
          :arrow 'last)
(define redraw-line
  (lambda (object-1 object-2 assoc-list)
    (let ((line (assq object-2 assoc-list)))
      (destroy (car (cdr line)))
      (set-cdr! line (list (draw-line object-1 object-2)))
Is there a better way to do this?
Thanks for any help.
Kevin K. Lewis               | My opinions may be unreasonable       | but such is the voice of inspiration
Received on Fri Jul 26 1996 - 14:11:56 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST