Accept px as units
This commit is contained in:
parent
ce1f3cbd4b
commit
eed3cc8246
1 changed files with 4 additions and 0 deletions
|
|
@ -1028,12 +1028,16 @@ def parse(fzpz, circuitpydef, pinoutcsv, arduinovariantfolder, substitute):
|
|||
svg_width = 25.4 * float(svg_width[:-2]) * MM_TO_PX
|
||||
elif "mm" in svg_width:
|
||||
svg_width = float(svg_width[:-2]) * MM_TO_PX
|
||||
elif "px" in svg_width:
|
||||
svg_width = float(svg_width[:-2])
|
||||
else:
|
||||
raise RuntimeError("Dont know units of width!", svg_width)
|
||||
if "in" in svg_height:
|
||||
svg_height = 25.4 * float(svg_height[:-2]) * MM_TO_PX
|
||||
elif "mm" in svg_height:
|
||||
svg_height = float(svg_height[:-2]) * MM_TO_PX
|
||||
elif "px" in svg_height:
|
||||
svg_height = float(svg_height[:-2])
|
||||
else:
|
||||
raise RuntimeError("Dont know units of width!", svg_height)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue