diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /share/extensions/layer2png.inx | |
parent | Initial commit. (diff) | |
download | inkscape-upstream/1.2.2.tar.xz inkscape-upstream/1.2.2.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | share/extensions/layer2png.inx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/share/extensions/layer2png.inx b/share/extensions/layer2png.inx new file mode 100644 index 0000000..1242854 --- /dev/null +++ b/share/extensions/layer2png.inx @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> + <name>Export Layer Slices</name> + <id>org.inkscape.output.export_slices</id> + <param name="tab" type="notebook"> + <page name="slicer_tab" gui-text="Options"> + <param name="iconmode" type="bool" gui-text="Icon mode">false</param> + <param name="sizes" type="string" gui-text="Sizes">128, 64, 48, 32, 24, 16</param> + <param name="layer" type="string" gui-text="Layer with Slices:">slices</param> + <param name="overwrite" type="bool" gui-text="Overwrite existing exports">true</param> + <param name="directory" type="path" mode="folder" gui-text="Directory"></param> + <param name="dpi" type="string" gui-text="DPI">300</param> + </page> + <page name="about_tab" gui-text="About"> + <label appearance="header">Layer Slicer</label> + <label>If you create a layer (default name "slices") with rectangles in it, this extension will export a PNG file for each rectangle into the directory with the name of the {rectangle ID}.png (use Object Properties to set this).</label> + <label>If the export already exists, it will skip it and color the rectangle GREY. If the "Overwrite existing exports" checkbox is selected, and the file was previously generated, it will color the rectangle RED. For new exports that did not previously exist, the rectangle will be GREEN.</label> + <label>If you want to create (square) icons at different sizes, select "Icon mode". Icon mode will create a square export for each dimension in "Sizes".</label> + + </page> + </param> + + + <!-- Live preview doesn't make sense so we add this attribute to + remove it --> + <effect needs-live-preview="false"> + <object-type>all</object-type> + <effects-menu> + <submenu name="Export"/> + </effects-menu> + </effect> + + <script> + <command location="inx" interpreter="python">layer2png.py</command> + </script> +</inkscape-extension> |