In that software that we have developed the end user composes a complete design with multiple layers, masks, text layers, etc. at size 12 inches X 18 inches.
Now after completing composition the use wants to enlarge the whole composed to 14 inches X 20 inches (or 12 inches X 24 inches).
To accomplish this what I am doing is looping from 0th layer to max layer and enlarging each layer as per calculated enlargement percentage, but I am not able to calculate the exact horizontal and vertical location of each layer. Because of this layers seem to get misaligned after enlargement.
How can we achieve this?
Note: in all cased the largest layer (in terms of size) is the 0th Layer.
I think you should shift layers centers by enlargement amount.
Some ad hoc solution would be to calculate and save layers center points in some TPoint array before enlargement process. After enlargement process, get new layers center points and shift PosX and PosY by the difference between old and new center points...something like that.