Lisp HUG Maillist Archive

output-pane area selection

Hey,
 
I try to draw a rectangle on an output-pane to display a selection. To do so I use the input-model of output-pane.
 
   :input-model '(((:button-1 :motion)
                    tdi++motion-callback)
                   ((:button-1 :release)
                    tdi++motion-callback-reset)))
 
I can draw the rectangle, but I have no clue how to "remove" the old one when I move the mouse and it draws the next one.
 
Is this going in the right direction? Or are there other possibilities?
 
Hope anyone can give me a hint or example on how to solve such drawing / redrawing stuff.
 
best regards,
Philipp

Re: output-pane area selection

Transients, like cursors and selection rectangles, are usually drawn 
with :operation :boole-xor.

e.g.

(gp:draw-line self beg-x beg-y beg-x (- beg-y beg-h)
                                 :foreground :white :operation boole-xor)

To remove the transient, you simply draw it again over top of itself.

pt

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:33 UTC