Re: How do I effeciently move a line?

From: Jean-Marie Kubek <>
Date: Fri, 26 Jul 1996 08:35:43 -0400

>>>>> "Kevin" == Kevin K Lewis <> writes:

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

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

[Stk code sniped ...]

    Kevin> Is there a better way to do this?

IMHO yes! Just change coordinates for your line. Something as the
following will surely work (in stklos) :

(define (redraw-line Object1 Object2 line)
        (set! (coords line)
                (some-combinator-for Object1 Object2)))

where some-combinator-for is your procedure handling connection between
Object1 and Object2.

But I have to say that I do not understand the association related
code you use in your procedure redraw-line :)

    Kevin> Thanks for any help.

Hope That it ...

Received on Fri Jul 26 1996 - 14:58:43 CEST

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