make applytransform independent from px unit

This commit is contained in:
Mario Voigt 2021-09-27 23:26:52 +02:00
parent 046ed8feaa
commit f3fa6690c1
1 changed files with 2 additions and 2 deletions

View File

@ -42,10 +42,10 @@ class ApplyTransformations(inkex.EffectExtension):
style = element.attrib.get('style')
style = dict(Style.parse_str(style))
update = False
if 'stroke-width' in style:
try:
stroke_width = float(style.get('stroke-width').strip().replace("px", ""))
#stroke_width = float(style.get('stroke-width').strip().replace("px", ""))
stroke_width = self.svg.uutounit(style.get('stroke-width').strip())
stroke_width *= math.sqrt(abs(transf.a * transf.d))
style['stroke-width'] = str(stroke_width)
update = True