Question: How do I delete a simple line
Steffen.Mueller at phaidros.com
Steffen.Mueller at phaidros.com
Tue Dec 5 13:19:55 UTC 2000
Hallo Bert,
Thanks for your tip. You are right, Morphic does all that for me but to slow
for big morphs! I am working on a 350 MHz Pentium with Win2000 and the
performance for dragging big morphs (or long polygons) is terrible.
This code now works for me:
(Line
from: 100 at 100
to: 200 at 200
withForm: (Form extent: 1 @ 1))
displayOn: Display
at: 0 @ 0
clippingBox: Display boundingBox
rule: Form reverse
fillColor: nil
The first call draws a line, the next removes this line from display.
Steffen
-----Original Message-----
From: Bert Freudenberg [mailto:bert at isg.cs.uni-magdeburg.de]
Sent: Freitag, 1. Dezember 2000 13:01
To: squeak at cs.uiuc.edu
Subject: RE: Question: How do I delete a simple line
On Fri, 1 Dec 2000 Steffen.Mueller at phaidros.com wrote:
> 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.
Checkout DisplayObject>>follow:while:bitsBehind:startingLoc: . This gives
an example how to save the bits before drawing, then drawing something,
then restoring the contents when the object moves. Try
Form fromUser followCursor
to see it in action. You would have to adapt this to draw something
different each time (it currently only displays a fixed size form).
Btw: Morphic does all that for you ;^)
-- Bert
More information about the Squeak-dev
mailing list
|