Dear Bob,
Thanks very much. :-)
Let me see if I understand what is going on.
You could override the #extent: method to do something like:
In resizing the morph is sent an #extent: message. We make sure the new extent has the correct proportions.
extent: aPoint
x _ aPoint x. y _ aPoint y. (y * aspectRatio) > x ifTrue: [ x _ y * aspectRatio ] ifFalse: [ y _ x / aspectRatio ].
Doing it this way makes for the greater extent, which is faster when expanding.
^super extent: (x@y) rounded
x@y is rounded because drawing requires an integral number of pixels.
Sending this message to super avoids the extra processing if it were sent to self. (And also avoids an infinite loop when rounding).
Where aspectRatio is an instance variable set to the desired x/y ratio.
Bueno!
Bill