Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: cryptology on August 19, 2018, 11:05:17 pm

Title: Lock aspect ratio when resizing an image element
Post by: cryptology on August 19, 2018, 11:05:17 pm
I wonder if there is a straightforward way to lock the aspect ratio of an image element when resizing it. I've checked the manual but so far the only way I found to achieve this is by counting pixels in the status bar.
Title: Re: Lock aspect ratio when resizing an image element
Post by: qwerty on August 20, 2018, 02:21:19 am
AFAIK this can only be done in a shape script by setting fixedAspectRatio.

q.
Title: Re: Lock aspect ratio when resizing an image element
Post by: Takeshi K on August 20, 2018, 11:44:20 am
If you are after a pasted image in diagrams, change its size with pressing SHIFT key.
It is the same as autoshapes in Excel, Word, etc.

Title: Re: Lock aspect ratio when resizing an image element
Post by: Plonka on December 18, 2024, 10:16:07 pm
edit\
Well...found the solution.
I had some other commands befor "fixedAspectRatio = "true";".
In the Guide it is written that it should be befor drawing commands. Thats why it didn't work in the first place.
\edit

For Images pressing SHIFT works, thank you for that!
In shape script I can not make it work.
From the MDG Guide I assume that it should look like this:

shape main
{
       fixedAspectRatio = "true";
       DrawNativeShape();
}

Am I right or is there something I got wrong.

Kind Regards

(I know I could open a new topic but I think it is usefull to have the solution here)