Repository navigation
Expand file tree
/
Copy pathflatternpattern.inx
More file actions
52 lines (47 loc) · 3.53 KB
/
Copy pathflatternpattern.inx
File metadata and controls
52 lines (47 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>FlatternPattern</name>
<id>io.github.weiss-d.flattern_pattern</id>
<param name="tab" type="notebook">
<page name="options" gui-text="Options">
<param name="mode" type="optiongroup" appearance="combo" gui-text="Output mode:">
<option value="clipped">Clipped copies</option>
<option value="merged">Merged outlines</option>
</param>
<param name="stroke_patterns" type="bool" gui-text="Also flatten stroke patterns (always as clipped copies)">true</param>
<param name="keep_original" type="bool" gui-text="Keep a hidden copy of the original">false</param>
<param name="cleanup_defs" type="bool" gui-text="Remove unused pattern definitions">true</param>
<param name="tile_limit" type="int" min="1" max="1000000" gui-text="Maximum number of tiles:">2000</param>
<param name="tolerance" type="float" min="0" max="1" precision="3" gui-text="Seam overlap (merged outlines):">0.01</param>
<param name="seam_bleed" type="bool" gui-text="Overlap clipped copies to hide seams"
gui-description="Renderers show thin light lines where two tiles meet. Select this option to make the shapes in each tile larger by the seam bleed.">false</param>
<param name="bleed_px" type="float" min="0" max="5" precision="2" gui-text="Seam bleed (px):"
gui-description="The distance by which the shapes grow, in px (1/96 in). 0.2 px hides almost all seams at a zoom of 100 % and more.">0.2</param>
<param name="inkscape_obb" type="bool" gui-text="Match the Inkscape view, not the SVG standard"
gui-description="Inkscape 1.4 shows patterns with objectBoundingBox units at another place than browsers. Select this option to keep the Inkscape view.">false</param>
</page>
<page name="help" gui-text="Help">
<label xml:space="preserve">FlatternPattern replaces a pattern fill or a pattern stroke with real geometry.
Clipped copies: the extension puts one copy of the tile content for each tile. A clip path with the shape of the object hides the rest. For a stroke, a mask with the shape of the stroke hides the rest. The result is exact and you can edit it.
Merged outlines: the extension converts strokes to paths and makes one filled path. Use this mode for stencils, plotters and cutters. This mode starts Inkscape in the background and needs more time. The path has the first color of the tile and no transparency. Pattern strokes always get clipped copies. The extension also makes clipped copies, and shows a message, in these cases:
- Inkscape does not start, or it gives no result.
- The tile has an image, text, a filter, a mask, a clip, markers, a gradient or a nested pattern.
The extension skips these objects and shows a message:
- text (use Object to Path first)
- clones (unlink them first)
- hatch fills and mesh gradients
- pattern strokes that do not scale with the object (vector-effect)
If the number of tiles is more than the maximum, the extension stops and changes nothing.
Version 0.1.1</label>
</page>
</param>
<effect needs-live-preview="false">
<object-type>all</object-type>
<effects-menu>
<submenu name="Modify Path"/>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">flatternpattern.py</command>
</script>
</inkscape-extension>