Jump to content
Search Community

transformmanager and sizing limits

Movix test
Moderator Tag

Recommended Posts

Hello,

 

First thank you for this great software that works like a charm.

 

I wonder if it is complicated to define sizing limit in the following way.

I'd like to only specify one size, for example 150 pixels as a limit.

During the resize process this limit is check for both, width and height, and as soon as either the width or the height has reached the defined limit, the sizing process is stoped.

 

As i understood, this is at the moment not possible with the transform manager as it is now. Would it be complicated to ad such a functionality to your software, or do i have to look for my one way to realize this ? I prefer to not modify your code because of the update compatibility.

 

Sorry for my bad english since i 'am french i'll try to explain things with my words.

Hope my question is clear :)

 

Movix

Link to comment
Share on other sites

hi,

 

yes i know these properties,but as you said it's not the same.

What i want to do is to restict the size of an object for only one side, width or height.

It is not easy for me to explain that in english...

 

If i use the properties you are talking about, i'll have to modify them dynamicaly upon sizing process.

During the sizing process i'll have to check and lock either maxScaleX or maxScaleY, the first of both that reaches the limit.

After that i'll have to continue checking if the sizing is going lesser than the limit in order to release the lock again. and so on.

 

I'am quite clear on how to manage this within my code, but as transformManager is allready doing this kind of checking, i'll asked myself if it would be complicated to add this into the transformManager in order go gain in CPU efficiency.

 

Movix

Link to comment
Share on other sites

If i use the properties you are talking about, i'll have to modify them dynamicaly upon sizing process.

During the sizing process i'll have to check and lock either maxScaleX or maxScaleY, the first of both that reaches the limit.

After that i'll have to continue checking if the sizing is going lesser than the limit in order to release the lock again. and so on.

 

I'm confused - why would you have to keep checking the size and locking or unlocking the scale? That's the whole point of minScaleX/maxScaleX/minScaleY/maxScaleY - so you don't have to do anything like that.

 

So if your object is 100 pixels wide and 50 pixels tall at its normal scale, but you don't want to allow it to exceed 150 pixels in either direction, you'd set maxScaleX to 1.5 and maxScaleY to 3.

 

Make sense?

Link to comment
Share on other sites

hi,

 

the reason is the following.

I am developing an application allowing users to design things that will be manufactured. on manufacturing side i have limitations in size like on plotters. that means you have a width limit but no length (height) limit.

 

If we take the example a width limit of N (the max size width the plotter can handle), and if we have a rectangle the user can resize X or Y, the resizing process must be stopted as soon as either the height or width of the rectangle reaches the limit N, but this only for the concerned side. in other words, if the height has reached the limit of N, maxScaleY would be set to N, and maxScaleX with no limit.

 

As it is complicated for me to explain this and as i am quite clear on how to realize it within my code, i do not whant to bother you more. The main aim i had was to avoid doing same inspections on rezising you allready do within you code. As it is not really a huge CPU usage for that, it is not very important :)

 

Thank you anyway for your answers an patience with my bad english :)

 

Movix

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...