kienerj / pycdxml

Tools to automatically convert and proccess cdx and cdxml files in python
GNU General Public License v3.0
35 stars 5 forks source link

Scaling changes relative distance between fragments #6

Closed kienerj closed 2 years ago

kienerj commented 2 years ago

If a document with multiple fragments get scaled, the distance between the fragments changes as well.

If the fragments shrink the distance becomes larger because currently they shrink towards their center. If they grow, the distance become smaller because they grow outwards from their center.

Possible solution:

Do not use fragments own center as reference but the center over all fragments / objects in the document. then scale and translate in a way the distance to the center scales the same way.

kienerj commented 2 years ago

fixed by c723f983a0ac0f46519107132aff06ccd9cc9291