On Thu, 2 May 2002, Titus J. Anderson wrote:
> On Wed, May 01, 2002 at 03:52:36PM -0500, Lars Clausen wrote:
>> Here's a slightly alternative approach: Only keep the aspect ratio
>> around while resizing with ratio fixed. Initialize the aspect ratio to
>> -1, then if we move with Shift, calculate the aspect ratio. When
>> changing the coordinates, use the aspect ratio if != -1. When moving
>> stops, reset the ratio to -1. That should make sure that the aspect
>> ratio is current without needing changes all over.
>
> That sounds okay, except I don't think it's what most people expect from
> an application. Most programs, IIRC, that do aspect scaling check the
> status of the shift key constantly and update the scaling based on the
> ORIGINAL aspect ratio. What this means is that when someone clicks on a
> handle, the program would have to calculate the aspect ratio and store it
> away somewhere. Then, while scaling, if the user hits the shift key, dia
> would need to switch to aspect scaling using the stored ratio. If they
> release the shift key, go back to normal sizing.
Well, if as Cyrille suggests we pass the modifiers to
element_move_handle(), it can decide whether to use the aspect_ratio or
not. It can then be unset once the resizing stops (which is a separate
move kind). In fact, then element_move_handle() can handle the setting of
the aspect_ratio itself, and the objects won't have to change at all. Much
fewer changes.
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor
"I do not agree with a word that you say, but I |----------------------------
will defend to the death your right to say it." | Where are we going, and
--Evelyn Beatrice Hall paraphrasing Voltaire | what's with the handbasket?