small adjustment in export selection as

This commit is contained in:
Mario Voigt 2021-10-11 12:07:40 +02:00
parent 4d8d350d89
commit 5bc8e6e7c1
2 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@
<param name="export_pdf" type="bool" gui-text="Export as PDF 1.5">false</param> <param name="export_pdf" type="bool" gui-text="Export as PDF 1.5">false</param>
<param name="export_png" type="bool" gui-text="Export as PNG">false</param> <param name="export_png" type="bool" gui-text="Export as PNG">false</param>
<param name="png_dpi" type="float" min="1" max="2400" precision="3" gui-text="PNG DPI (applies for export and replace)" gui-description="default is 96">96</param> <param name="png_dpi" type="float" min="1" max="2400" precision="3" gui-text="PNG DPI (applies for export and replace)" gui-description="default is 96">96</param>
<param name="replace_by_png" type="bool" gui-text="Replace by PNG">false</param> <param name="replace_by_png" type="bool" gui-text="Replace by PNG" gui-description="Please convert strokes to paths to keep exact size and prevent cutoffs!">false</param>
<param name="newwindow" type="bool" gui-text="Open file in new Inkscape instance">false</param> <param name="newwindow" type="bool" gui-text="Open file in new Inkscape instance">false</param>
<label>Note: If svg/dxf/pdf already existed before, they might get accidently deleted or overwritten. Please take care!</label> <label>Note: If svg/dxf/pdf already existed before, they might get accidently deleted or overwritten. Please take care!</label>
</page> </page>

View File

@ -262,7 +262,8 @@ class ExportObject(inkex.EffectExtension):
imgReplacement.attrib['id'] = firstId imgReplacement.attrib['id'] = firstId
imgReplacement.attrib['{http://www.w3.org/1999/xlink}href'] = "data:image/png;base64,{}".format(base64_str) imgReplacement.attrib['{http://www.w3.org/1999/xlink}href'] = "data:image/png;base64,{}".format(base64_str)
parent.append(imgReplacement) parent.append(imgReplacement)
del parent.attrib['transform'] #remove transform if parent.attrib.has_key('transform'):
del parent.attrib['transform'] #remove transform
def create_document(self): def create_document(self):