small fixes
This commit is contained in:
parent
06433e388c
commit
f63f1bb0aa
@ -7,6 +7,7 @@
|
|||||||
import copy
|
import copy
|
||||||
import math
|
import math
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
import re
|
||||||
import inkex
|
import inkex
|
||||||
from inkex.paths import CubicSuperPath, Path
|
from inkex.paths import CubicSuperPath, Path
|
||||||
from inkex.transforms import Transform
|
from inkex.transforms import Transform
|
||||||
@ -44,13 +45,11 @@ class ApplyTransformations(inkex.EffectExtension):
|
|||||||
update = False
|
update = False
|
||||||
if 'stroke-width' in style:
|
if 'stroke-width' in style:
|
||||||
try:
|
try:
|
||||||
#stroke_width = float(style.get('stroke-width').strip().replace("px", ""))
|
stroke_width = self.svg.unittouu(style.get('stroke-width')) / self.svg.unittouu("1px")
|
||||||
stroke_width = self.svg.uutounit(style.get('stroke-width').strip())
|
stroke_width *= math.sqrt(abs(transf.a * transf.d - transf.b * transf.c))
|
||||||
stroke_width *= math.sqrt(abs(transf.a * transf.d))
|
|
||||||
#stroke_width *= math.sqrt(abs(transf.a * transf.d - transf.b * transf.c))
|
|
||||||
style['stroke-width'] = str(stroke_width)
|
style['stroke-width'] = str(stroke_width)
|
||||||
update = True
|
update = True
|
||||||
except AttributeError:
|
except AttributeError as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if update:
|
if update:
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "Box Maker - <various>",
|
"name": "Box Maker - <various>",
|
||||||
"id": "fablabchemnitz.de.boxmaker_tabbed.<various>",
|
"id": "fablabchemnitz.de.box_maker_tabbed.<various>",
|
||||||
"path": "boxmaker_tabbed",
|
"path": "box_maker_tabbed",
|
||||||
"dependent_extensions": null,
|
"dependent_extensions": null,
|
||||||
"original_name": [
|
"original_name": [
|
||||||
"Schroff Box Maker",
|
"Schroff Box Maker",
|
Reference in New Issue
Block a user