'Real' zooming&panning

Ned Konz ned at bike-nomad.com
Sat Nov 1 16:15:56 UTC 2003


On Saturday 01 November 2003 2:50 am, cg at tric.nl wrote:
> Andreas Raab <squeak-dev at lists.squeakfoundation.org> said:
> >> Is this the right direction? Sorry for bothering y'all, but this stuff
> >> is extremely time-consuming to find out...
> >
> >Yes, that's exactly the right thing to do. No idea why it barfs though...
>
> A second attempt gave slightly better results. However, when scaling,
> the fills are scaled (and scroll along nicely), all the outlines however
> stay at scale 1.0 (and don't scroll), and clipping is a mess.

How were you doing this?

> I figure Morphic is not the right thing for this job - probably I need
> to do a Model/Presentation separation and simply render the presentation
> directly with Balloon.

Morphic should be fine for this, given a bit of thought about the design.

There are some places in the event handling where transforms aren't being 
applied (some of this has broken recently, I think; you can see the problem 
in a WiW morph when you click to get the world menu). These are easy to fix 
and should be.

I don't think the Canvas should do anything different from dumb scaling of 
whatever gets drawn on it. So the morphs should be scaled, as well as their 
outlines.

Should something with a border width of 10 at full scale still have a border 
width of 10 when it's scaled down by 1/1000?

If you want different behavior than just pure scaling, use BalloonCanvas (in 
deferred mode if you can) and draw your morphs with the appropriate sizes for 
borders, text, etc.. You can ask the canvas for its transform if you need to.

Watch out for the limits of ShortPointArray when you're drawing in Balloon, 
BTW.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list