Closed Chomucho closed 1 year ago
While some of the fills are wrong in meerk40t there, the positions are actually spot on.
import numpy as np
import matplotlib.pyplot as plt
from svgelements import *
svg_file = './SVG_Logo.svg'
svg = SVG.parse(svg_file)
svg_elements = list(svg.elements())
plt.gca().invert_yaxis()
for e in svg_elements:
if isinstance(e, Shape):
pts = e.npoint(np.linspace(0,1,100))
plt.plot(pts[:,0], pts[:,1])
plt.show()
The other bits in the image were there but way zoomed out. Found them. Yeah, matplotlib is displaying things correctly, svgelements is rendering it wrongly. Likely due to the use nodes there.
This was fixed in #160 svgelements 1.8.0
Contact Details
No response
Summary Description
I'm testing with SVG logo file, and there is nested 'g' tag with translate transform. This translate applied at the first time and later the file call 'use' than applied once more.
Additional Details
I checked one of the 'svgbar' and find out that translate transform applied twice. I guess it's because of nested g tag.
Here's the section using 'svgbar'.
As you can see the picture below, first 'svgbar' of second 'svgstar' (generate by use) doesn't affected. This may happens beacuse first 'svgbar' defined as path.