Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to NOT flatten the transformation matrices when saving the .svg output file? #184

Open
Emasoft opened this issue Aug 13, 2022 · 0 comments

Comments

@Emasoft
Copy link

Emasoft commented Aug 13, 2022

Is it possible to NOT flatten the transformation matrices when saving the .svg output file?
I'm doing this kind of steps for a project:

  1. read all parent groups of an svg element
  2. read all transforms matrices of the parent groups
  3. convert all svg transform matrices in numpy arrays
  4. concatenate all transforms in a single matrix using numpy matrix multiplication (@ operator)
  5. make a lot of numpy/scipy complex computations that ends producing a final numpy transform matrix
  6. apply this transform matrix to one or more groups of elements in the svg file but without applying the transform and flattening the paths
  7. save the resulting svg file (with the resulting transform matrix still explicitly written in the transform attribute of the parent group, so I can add or remove elements from the group, or move an element from a group to another, without any changes to the elements/paths).

Currently it is impossible to do this with the svgpathtools API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant