File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,6 +221,25 @@ $this | Add-Member -MemberType NoteProperty -Force -Name '.Stroke' -Value $value
221221$this | Add-Member -MemberType NoteProperty -Force -Name '.StrokeThickness' -Value $value
222222 </SetScriptBlock >
223223 </ScriptProperty >
224+ <ScriptProperty >
225+ <Name >SVG</Name >
226+ <GetScriptBlock >
227+ param()
228+ @(
229+
230+ $viewX = [Math]::Max($this.Maximum.X, $this.Minimum.X * -1)
231+ $viewY = [Math]::Max($this.Maximum.Y, $this.Minimum.Y * -1)
232+
233+ "< svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 $viewX $viewY' transform-origin='50% 50%' width='100%' height='100%'> "
234+ "< path id='turtle-path' transform-origin='50% 50%' d='$($this.PathData)' stroke='$(
235+ if ($this.Stroke) { $this.Stroke } else { '#4488ff' }
236+ )' stroke-thickness='$(
237+ if ($this.StrokeThickness) { $this.StrokeThickness } else { '0.1%' }
238+ )' fill='transparent'/> "
239+ "< /svg> "
240+ ) -join '' -as [xml]
241+ </GetScriptBlock >
242+ </ScriptProperty >
224243 </Members >
225244 </Type >
226245</Types >
You can’t perform that action at this time.
0 commit comments