add more templates to paper insert

This commit is contained in:
Mario Voigt 2022-12-01 21:08:35 +01:00
parent a52b8ccf08
commit c689c81d51
2 changed files with 12 additions and 0 deletions

View File

@ -3,12 +3,18 @@
<name>Insert Paper Template</name>
<id>fablabchemnitz.de.insert_paper_template</id>
<param name="papertype" type="optiongroup" appearance="combo" gui-text="Box type">
<option value="A6">A6</option>
<option value="A5">A5</option>
<option value="A4">A4</option>
<option value="A3">A3</option>
<option value="A2">A2</option>
<option value="A1">A1</option>
<option value="A0">A0</option>
<option value="B6">B6</option>
<option value="B5">B5</option>
<option value="C6">C6</option>
<option value="C5">C5</option>
<option value="DIN_LANG">DIN lang</option>
<option value="POKER">Poker Card</option>
<option value="BRIDGE">Bridge Card</option>
<option value="MINI_US">Mini American Card</option>

View File

@ -38,12 +38,18 @@ class InsertPaperTemplate(inkex.EffectExtension):
self.Group = etree.SubElement(self.svg.get_current_layer(), inkex.addNS('g','svg'), {} )
papertypes = {}
papertypes["A6"] = (105, 148, "#00ffff") # cyan
papertypes["A5"] = (148, 210, "#ffeeaa") # yellow
papertypes["A4"] = (210, 297, "#ffccaa") # orange
papertypes["A3"] = (297, 420, "#afdde9") # blue
papertypes["A2"] = (420, 594, "#ccaaff") # purple
papertypes["A1"] = (594, 841, "#afe9c6") # green
papertypes["A0"] = (841, 1189, "#ffd5d5") # red
papertypes["B6"] = (125, 176, "#ffccaa") # orange
papertypes["B5"] = (176, 250, "#afdde9") # blue
papertypes["C6"] = (114, 162, "#ccaaff") # purple
papertypes["C5"] = (162, 228, "#afe9c6") # green
papertypes["DIN_LANG"] = (110, 220, "#ffd5d5") # red
papertypes["POKER"] = (63.5, 88, "#ffffff") # white
papertypes["BRIDGE"] = (56, 88, "#ffffff") # white
papertypes["MINI_US"] = (41, 63, "#ffffff") # white