'Real' zooming&panning
Cees de Groot
cg at tric.nl
Sun Nov 2 15:04:48 UTC 2003
On Sat, 2003-11-01 at 17:15, Ned Konz wrote:
> How were you doing this?
>
With the code I posted. I took a design (a bitmap as background image
with some PolygonMorphs added to it, one of them showing handles), and
opened it in a MyTwoWayScrollPane.
> 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.
>
That's not what you want for a design program (think CAD) - in 99.99% of
the cases, you want the outline of an element to be drawn with a 1 pixel
wide border. Furthermore, the PolygonMorph handles should not scale, you
always want them at the same absolute size because they are user
interface things, not design elements.
> 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.
>
'use BalloonCanvas' is easier said than done (until someone can give me
a pointer to documentation - I still have to find even a single class
that has a class comment), but I fear it's the only approach - build a
model hierarchy of design elements, and manually draw them on a
BalloonCanvas (i.e. completely bypass Morphic for this bit).
More information about the Squeak-dev
mailing list
|