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

Calling placeat() twice does not work as expected #6

Open
oskeith opened this issue Jul 17, 2023 · 0 comments
Open

Calling placeat() twice does not work as expected #6

oskeith opened this issue Jul 17, 2023 · 0 comments

Comments

@oskeith
Copy link

oskeith commented Jul 17, 2023

Considering something similar to the example:

output = Element(384, 356)  # size of the output file.

fate = Element('assets/fate.svg').rotate(-15)
output.placeat(fate, 0.73, 23.55)
output.placeat(fate, 107.81, 8.76)

output.dump('output.svg')

Expected behavior: There will be two of the 'fate' elements at two different positions

Actual behavior: there is one 'fate' element at neither of the specified locations

As a side note, I tried calling the .copy() method but that seems to be from svgutils and doesn't return a svgmanip element. Addiptionally, I tried a loads(.dumps()) to try to make a copy and get the following error, even though when debugging it does appear to be a b'' object

File "[file]", line 37, in place_layout_2
Element.loads(graphic.dumps())
File "C:\Users\keith\miniconda3\lib\site-packages\svgmanip_generator.py", line 141, in dumps
out = out.replace("version='1.0'", 'version="1.0"')
TypeError: a bytes-like object is required, not 'str'

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