We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Turtle.get_Pattern
1 parent 8620a32 commit 4d2544aCopy full SHA for 4d2544a
Types/Turtle/get_Pattern.ps1
@@ -0,0 +1,14 @@
1
+param()
2
+@(
3
+$viewX = [Math]::Max($this.Maximum.X, $this.Minimum.X * -1)
4
+$viewY = [Math]::Max($this.Maximum.Y, $this.Minimum.Y * -1)
5
+"<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'>"
6
+"<defs>"
7
+ "<pattern id='turtle-pattern' patternUnits='userSpaceOnUse' width='$viewX' height='$viewY' transform-origin='50% 50%'>"
8
+ "<path id='turtle-path' d='$($this.PathData)' stroke='$(
9
+ if ($this.Stroke) { $this.Stroke } else { 'black' }
10
+ )' fill='transparent'/>"
11
+ "</pattern>"
12
+"</defs>"
13
+"<rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='url(#turtle-pattern)' />"
14
+"</svg>") -join '' -as [xml]
0 commit comments