Merge branch 'svg' of https://github.com/markotoplak/pyqtgraph into markotoplak-svg

This commit is contained in:
Luke Campagnola 2018-03-29 09:04:56 -07:00
commit e21a4e19b0

View File

@ -372,7 +372,7 @@ def correctCoordinates(node, defs, item):
ch.setAttribute('font-family', ', '.join([f if ' ' not in f else '"%s"'%f for f in families])) ch.setAttribute('font-family', ', '.join([f if ' ' not in f else '"%s"'%f for f in families]))
## correct line widths if needed ## correct line widths if needed
if removeTransform and ch.getAttribute('vector-effect') != 'non-scaling-stroke': if removeTransform and ch.getAttribute('vector-effect') != 'non-scaling-stroke' and grp.getAttribute('stroke-width'):
w = float(grp.getAttribute('stroke-width')) w = float(grp.getAttribute('stroke-width'))
s = fn.transformCoordinates(tr, np.array([[w,0], [0,0]]), transpose=True) s = fn.transformCoordinates(tr, np.array([[w,0], [0,0]]), transpose=True)
w = ((s[0]-s[1])**2).sum()**0.5 w = ((s[0]-s[1])**2).sum()**0.5