<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
    <name>Restack</name>
    <id>org.inkscape.filter.restack</id>
    <param name="tab" type="notebook">
        <page name="positional" gui-text="Based on Position">
            <label appearance="header">Restack Direction</label>
            <param name="nb_direction" type="notebook">
                <page name="presets" gui-text="Presets">
                    <param name="direction" type="optiongroup" appearance="combo" gui-text="Direction">
                        <option value="lr">Left to Right (0)</option>
                        <option value="bt">Bottom to Top (90)</option>
                        <option value="rl">Right to Left (180)</option>
                        <option value="tb">Top to Bottom (270)</option>
                        <option value="ro">Radial Outward</option>
                        <option value="ri">Radial Inward</option>
                    </param>
                </page>
                <page name="custom" gui-text="Custom">
                    <param name="angle" type="float" min="0.0" max="360.0" gui-text="Angle:">0.00</param>
                </page>
            </param>
            <label appearance="header">Object Reference Point</label>
            <param name="xanchor" type="optiongroup" appearance="combo" gui-text="Horizontal:">
                <option value="l">Left</option>
                <option value="m">Middle</option>
                <option value="r">Right</option>
            </param>
            <param name="yanchor" type="optiongroup" appearance="combo" gui-text="Vertical:">
                <option value="t">Top</option>
                <option value="m">Middle</option>
                <option value="b">Bottom</option>
            </param>
        </page>
        <page name="z_order" gui-text="Based on Z-Order">
            <param name="zsort" type="optiongroup" appearance="combo" gui-text="Restack Mode">
                <option value="rev">Reverse Z-Order</option>
                <option value="rand">Shuffle Z-Order</option>
            </param>
        </page>
        <page name="help" gui-text="Help">
            <label xml:space="preserve">
This extension changes the z-order of objects based on their position
on the canvas or their current z-order.
The extension restacks all the selected objects. Groups are treated as
a single object.
If elements of a group are selected together with external objects,
the elements of the group are extracted and positioned next to the other
objects being restacked (elements on different layers are brought together
to the same layer).
            </label>
        </page>
    </param>
    <effect>
    <object-type>path</object-type>
    <effects-menu>
        <submenu name="Arrange"/>
    </effects-menu>
    </effect>
    <script>
        <command location="inx" interpreter="python">restack.py</command>
    </script>
</inkscape-extension>
