I'm trying to figure out the algorithm for scaling multiple selected objects on a canvas (similar to Visio's behavior). Say for instance I have the following selected objects in my application:
I then drag the lower-right handle of the bounding box to increase the size of the selected objects and thus produce the following results:
My questions are as follows:
- How do I get the amount of scaling to be applied to each object?
- How do I get the amount of translation to be applied to each object?
I hope this question makes sense. And I hope you could help.