Book a Demo

Author Topic: Resize Inserted Image Proportionally  (Read 5774 times)

steVisel

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Resize Inserted Image Proportionally
« on: April 30, 2014, 01:03:25 am »
Is there a way to proportionally resize an inserted image? We need to add a company logo and other images to diagrams. I can resize the inserted image vertically or horizontally, but can't keep the same aspect ratio.
A sign in the window reads "Cured Meats." Inside, a salami takes his first steps since the accident. A prosciutto learns to forgive.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Resize Inserted Image Proportionally
« Reply #1 on: April 30, 2014, 01:09:00 am »
You would need to script that. Once the diagram object has changed you need to query the width/height and make it proportional to either.

Unlike most drawing tools EA has no key to resize proportionally (at least none I know).

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Resize Inserted Image Proportionally
« Reply #2 on: April 30, 2014, 08:48:01 am »
A shape script like this might help:

Code: [Select]
shape main
{
      fixedAspectRatio="true";
      image("logo.bmp",0,0,100,100);
}
The Sparx Team
[email protected]

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Resize Inserted Image Proportionally
« Reply #3 on: April 30, 2014, 08:50:22 am »
Hold Shift while resizing will do it. (Only for elements showing an alternate image)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Resize Inserted Image Proportionally
« Reply #4 on: April 30, 2014, 10:16:40 am »
Quote
Hold Shift while resizing will do it. (Only for elements showing an alternate image)
Ah. I tried with simple elements without alt image. Why doesn't that work also?

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Resize Inserted Image Proportionally
« Reply #5 on: April 30, 2014, 10:35:10 am »
It could be, but it seems less relevant.

If I'm resizing a class, what does the aspect ratio matter? If resizing one of the ellipse types it does it by default.