Let’s say a main frame has a width of 200 and a height of 500, and a secondary frame is inside the main frame with a scale size of 0.1, 0.2. I want to decrease or increase the size of the secondary frame by an x amount from the main frame’s size.
The idea was to get the absolute size of the main frame and decrease that by an x amount, but this does not work as it only affects like a 1% percentage of the x amount.
Is there any reason you don’t change the scale size? Since you want to do percentage-based size changes it feels like changing the scale size would be the best way.
I don’t really understand your main question to be honest, can you give me an example of what you want to achieve? I don’t understand why you’d want to change the size of something based off of something without having it pre-set (as in, why not just update the initial scale to work for all sizes you want?)
237, 305 -- The size of the secondary frame
67 -- this is the amount that I want to decrease the secondary frame
The 67 is the x value from 305-237 so the secondary frame would have the same size, which is 237, 237. The only thing that is left is to subtract the main frame, so it also affects every frame inside the main frame. Here is what it looks like if I only change the secondary frame:
Do you mean you want it to have an aspect ratio of 1:1? I don’t really understand what your size is in this case, since it is a 2D object and not 1D. I’m just trying to understand why you’d need to do this programatically?
That’s because I have this method that allows to change the image:
And changing the image to circle must be the same size, as it looks weird when its not.
I’m assuming you have a few different frames. Color area, input area, preview area, basic area and Custom area.
If I understand things correctly you want to change the size of Color area (which includes the circle/square and the large bar on the side.) depending on the size of the square/circle? Do you also want to increase the size of the input area or do you intend on leaving a gap between them?