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_SVG
1 parent 3b058cd commit ebe9773Copy full SHA for ebe9773
Types/Turtle/get_SVG.ps1
@@ -0,0 +1,14 @@
1
+param()
2
+@(
3
+
4
+$viewX = [Math]::Max($this.Maximum.X, $this.Minimum.X * -1)
5
+$viewY = [Math]::Max($this.Maximum.Y, $this.Minimum.Y * -1)
6
7
+"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 $viewX $viewY' transform-origin='50% 50%' width='100%' height='100%'>"
8
+ "<path id='turtle-path' transform-origin='50% 50%' d='$($this.PathData)' stroke='$(
9
+ if ($this.Stroke) { $this.Stroke } else { '#4488ff' }
10
+ )' stroke-thickness='$(
11
+ if ($this.StrokeThickness) { $this.StrokeThickness } else { '0.1%' }
12
+ )' fill='transparent'/>"
13
+"</svg>"
14
+) -join '' -as [xml]
0 commit comments