[Q] slow animated dashed lines/connectors

Ned Konz ned at bike-nomad.com
Sat Apr 19 18:56:21 UTC 2003

On Saturday 19 April 2003 11:36 am, Martin Drautzburg wrote:
> Ned Konz <ned at bike-nomad.com> writes:
> > But the simplest way to do this kind of thing in general is to
> > use a FormCanvas and tell your Morph to draw on the FormCanvas.
> > This renders to a real Form that can then be used to draw with
> > later.
> Okay I tried that
> |form rect|
> rect _ (SchemeView example2).
> form _ FormCanvas extent: rect extent.
> rect drawOnCanvas: form.
> 	[Sensor anyButtonPressed]
> 		whileFalse: [
> form showAt: Sensor cursorPoint]
> I can move the form around in no time. Nice. But of course is
> destroys my background. Are you aware of any code I could steel
> ideas from for fast dragging. (This is NOT the animation issue but
> the dragging issue from an earlier thread)

What are you trying to drag? If it's a rectangular area, you don't 
have to worry about the background unless you have holes in it.

In any event, if you have a Form whose background is transparent, you 
can render your Morph to it and then paint it on top of whatever you 

For instance, try this Workspace code.

p _ PolygonMorph new setVertices: { 0 at 0. 100 at 100 }; makeOpen.
p openInWorld.
fc _ FormCanvas extent: p fullBounds extent.
p drawOn: fc.
fc form openAsMorph.

Ned Konz

More information about the Squeak-dev mailing list