@@ -242,8 +242,8 @@ return ([pscustomobject]@{ X = 0; Y = 0 })
242242 <GetScriptBlock >
243243 param()
244244$segments = @(
245- $viewX = [Math]::Max( $this.Maximum.X, $this.Minimum.X * -1)
246- $viewY = [Math]::Max( $this.Maximum.Y, $this.Minimum.Y * -1)
245+ $viewX = $this.Maximum.X + ( $this.Minimum.X * -1)
246+ $viewY = $this.Maximum.Y + ( $this.Minimum.Y * -1)
247247"< svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'> "
248248"< defs> "
249249 "< pattern id='turtle-pattern' patternUnits='userSpaceOnUse' width='$viewX' height='$viewY' transform-origin='50% 50%'$(
@@ -258,6 +258,8 @@ $viewY = [Math]::Max($this.Maximum.Y, $this.Minimum.Y * -1)
258258 $(if ($this.PatternAnimation) { $this.PatternAnimation })
259259 "< path id='turtle-path' d='$($this.PathData)' stroke='$(
260260 if ($this.Stroke) { $this.Stroke } else { 'black' }
261+ )' stroke-width='$(
262+ if ($this.StrokeWidth) { $this.StrokeWidth } else { '0.1%' }
261263 )' fill='transparent'/> "
262264 "< /pattern> "
263265"< /defs> "
@@ -380,18 +382,18 @@ $this | Add-Member -MemberType NoteProperty -Force -Name '.Stroke' -Value $value
380382 </SetScriptBlock >
381383 </ScriptProperty >
382384 <ScriptProperty >
383- <Name >StrokeThickness </Name >
385+ <Name >StrokeWidth </Name >
384386 <GetScriptBlock >
385- if ($this.'.StrokeThickness ') {
386- return $this.'.StrokeThickness '
387+ if ($this.'.StrokeWidth ') {
388+ return $this.'.StrokeWidth '
387389} else {
388390 return '0.1%'
389391}
390392 </GetScriptBlock >
391393 <SetScriptBlock >
392394 param([string]$value)
393395
394- $this | Add-Member -MemberType NoteProperty -Force -Name '.StrokeThickness ' -Value $value
396+ $this | Add-Member -MemberType NoteProperty -Force -Name '.StrokeWidth ' -Value $value
395397 </SetScriptBlock >
396398 </ScriptProperty >
397399 <ScriptProperty >
@@ -400,14 +402,14 @@ $this | Add-Member -MemberType NoteProperty -Force -Name '.StrokeThickness' -Val
400402 param()
401403@(
402404
403- $viewX = [Math]::Max( $this.Maximum.X, $this.Minimum.X * -1)
404- $viewY = [Math]::Max( $this.Maximum.Y, $this.Minimum.Y * -1)
405+ $viewX = $this.Maximum.X + ( $this.Minimum.X * -1)
406+ $viewY = $this.Maximum.Y + ( $this.Minimum.Y * -1)
405407
406408"< svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 $viewX $viewY' transform-origin='50% 50%' width='100%' height='100%'> "
407409 "< path id='turtle-path' transform-origin='50% 50%' d='$($this.PathData)' stroke='$(
408410 if ($this.Stroke) { $this.Stroke } else { '#4488ff' }
409- )' stroke-thickness ='$(
410- if ($this.StrokeThickness ) { $this.StrokeThickness } else { '0.1%' }
411+ )' stroke-width ='$(
412+ if ($this.StrokeWidth ) { $this.StrokeWidth } else { '0.1%' }
411413 )' fill='transparent'/> "
412414"< /svg> "
413415) -join '' -as [xml]
@@ -418,13 +420,16 @@ $viewY = [Math]::Max($this.Maximum.Y, $this.Minimum.Y * -1)
418420 <GetScriptBlock >
419421 param()
420422
421- @(
422- $viewX = [Math]::Max($this.Maximum.X, $this.Minimum.X * -1)
423- $viewY = [Math]::Max($this.Maximum.Y, $this.Minimum.Y * -1)
423+ $viewX = $this.Maximum.X + ($this.Minimum.X * -1)
424+ $viewY = $this.Maximum.Y + ($this.Minimum.Y * -1)
425+
426+ @(
424427 "< svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'> "
425428 "< symbol id='turtle-symbol' viewBox='0 0 $viewX $viewY' transform-origin='50% 50%'> "
426429 "< path id='turtle-path' transform-origin='50% 50%' d='$($this.PathData)' stroke='$(
427430 if ($this.Stroke) { $this.Stroke } else { 'black' }
431+ )' stroke-width='$(
432+ if ($this.StrokeWidth) { $this.StrokeWidth } else { '0.1%' }
428433 )' fill='transparent'/> "
429434 "< /symbol> "
430435 "< use href='#turtle-symbol' width='100%' height='100%' /> "
0 commit comments