Question: How do I delete a simple line

Steffen.Mueller at phaidros.com Steffen.Mueller at phaidros.com
Fri Dec 1 10:53:53 UTC 2000


Hallo Hans-Martin,

I want to drag a line very fast from one point to another and I hoped I
could use the same method like in SystemWindow (see doFastFrameDrag).
I'm afraid 'restore display' is not the right method to do this.

Steffen

-----Original Message-----
From: Hans-Martin Mosner [mailto:hmm at heeg.de]
Sent: Freitag, 1. Dezember 2000 11:33
To: squeak at cs.uiuc.edu
Subject: Re: Question: How do I delete a simple line


Steffen.Mueller at phaidros.com wrote:

> Hallo,
>
> I use
>
>         aForm := Form extent: 2 @ 2.
>         aForm fillBlack.
>         (Line
>                 from: 10 @ 10
>                 to: 100 at 100
>                 withForm: aForm)
>                 displayOn: Display
>                 at: 0 @ 0
>                 clippingBox: Display boundingBox
>
> to draw a nonmorphic line.
>
> How do I delete this line from display?
>
> Steffen

Just do a 'restore display' from the desktop menu :-)
Painting on the display is destructive, pixels behind the line are lost.
The windows know how to redraw themselves, however, so you can get a
clean desktop again by executing 'Display restore'.
If you want to play around with nonmorphic graphics, you should use
Display restoreAfter: ["some graphics"]
This paints your stuff, waits for a mouse button to be pressed, and
restores the display.

Cheers,
Hans-Martin





More information about the Squeak-dev mailing list