I have a fairly simple application using a set of nested
boxes for layout, nothing fancy. In the middle I have a Canvas
derived object that has children added to it (e.g. sprites). I want
to be able to zoom in and out of the Canvas, which I thought would
be as simple as setting scaleX and scaleY.
While adjusting those variables does zoom, it has a couple
side effects. First, it zooms from the registration point (0,0),
which I've worked around by adding pre/post-translations. The
second, and FAR bigger issue, is that changing the scale makes the
Canvas expand past its borders, overflowing onto neighbors (unless
I zoom out, in which case it goes to postage stamp size).
I had hoped that there would be a simple way to say "This
container has the following screen dimensions (percentages) but
please zoom the contents in/out by this amount". My only other
option is to implement all of this manually, which sounds like a
lot of reinventing the wheel.