1 Reply Latest reply on Jul 27, 2017 5:39 AM by A. Patterson

    Preserving aspect ratio of objects

    Pierrot Dev Level 1

      Ok, I probably stupidely stoped that discussion thread, but lets try to continue it.

       

      My question was

      How can I know that an art is aspect ratio-constrained or not through the API?

      I cannot find this specific object property.

      Thanks

       

      And Paterson answer was:

      I don't know that art has an such property. The only time they do that (as far as I know) is when you hold shift down while resizing something (e.g. art or using a tool like the rectangle or ellipse tool).

       

      My new question is the following:

      Actually when resizing an object manually only the shift key constrains the aspect ratio. You are right.

      However looking on most of the objects tool bars, or the transform panel, there is a small "chain" or "broken chain" icon that allows, when changing the H or W size by the next up-down control, to maintain or not the aspect ratio.

      So this property exists at least internaly, but I cannot find it in the API.

      This is what I am looking for.

      Any idea?

         

      Pierre

        • 1. Re: Preserving aspect ratio of objects
          A. Patterson Level 4

          I know the chain you're talking about, but I'm still pretty sure there's nothing internally. The chain is purely a UI element; it can determine the aspect ratio and constrain your inputs if you turn that on.

           

          I'm pretty sure it'd be impossible to have this as a property because ultimately, everything is governed by a transformation matrix, and that can be amended with any other matrix (See AITransformArt.h). The only place you can constrain the aspect ratio would be at the point of input, hence the shift key modifier & the chain button.