@@ -1853,6 +1853,50 @@ if ($VerbosePreference -ne 'SilentlyContinue') {
1853
1853
}
1854
1854
</SetScriptBlock >
1855
1855
</ScriptProperty >
1856
+ <ScriptProperty >
1857
+ <Name >Height</Name >
1858
+ <GetScriptBlock >
1859
+ < #
1860
+ .SYNOPSIS
1861
+ Gets the Turtle height
1862
+ .DESCRIPTION
1863
+ Gets the Turtle's ViewBox height.
1864
+ .NOTES
1865
+ If this has not been set, it will be automatically computed from the distance between the minimum and maximum.
1866
+ .EXAMPLE
1867
+ turtle rotate 90 forward 100 width
1868
+ #>
1869
+ param()
1870
+ if ($this.'.ViewBox') {
1871
+ return @($this.'.ViewBox')[-1]
1872
+ }
1873
+
1874
+ $viewY = $this.Maximum.Y + ($this.Minimum.Y * -1)
1875
+ return $viewY
1876
+
1877
+
1878
+
1879
+
1880
+ </GetScriptBlock >
1881
+ <SetScriptBlock >
1882
+ < #
1883
+ .SYNOPSIS
1884
+ Sets the turtle height
1885
+ .DESCRIPTION
1886
+ Sets the Turtle viewbox height.
1887
+ .NOTES
1888
+ Once set, it will no longer be automatically computed.
1889
+ #>
1890
+ param(
1891
+ [double]
1892
+ $height
1893
+ )
1894
+
1895
+ $viewBox = $this.ViewBox
1896
+ $this.ViewBox = $viewBox[0],$viewBox[1],$viewbox[-2], $height
1897
+
1898
+ </SetScriptBlock >
1899
+ </ScriptProperty >
1856
1900
<ScriptProperty >
1857
1901
<Name >ID</Name >
1858
1902
<GetScriptBlock >
@@ -2609,6 +2653,49 @@ if ($chromeOutput -match '<img\ssrc="data:image/\w+;base64,(?<b64>[^"]+
2609
2653
2610
2654
</GetScriptBlock >
2611
2655
</ScriptProperty >
2656
+ <ScriptProperty >
2657
+ <Name >Width</Name >
2658
+ <GetScriptBlock >
2659
+ < #
2660
+ .SYNOPSIS
2661
+ Gets the Turtle width
2662
+ .DESCRIPTION
2663
+ Gets the Turtle's ViewBox width.
2664
+ .NOTES
2665
+ If this has not been set, it will be automatically computed from the distance between the minimum and maximum.
2666
+ .EXAMPLE
2667
+ turtle forward 100 width
2668
+ #>
2669
+ if ($this.'.ViewBox') {
2670
+ return @($this.'.ViewBox')[-2]
2671
+ }
2672
+
2673
+ $viewX = $this.Maximum.X + ($this.Minimum.X * -1)
2674
+ return $viewX
2675
+
2676
+
2677
+
2678
+ </GetScriptBlock >
2679
+ <SetScriptBlock >
2680
+ < #
2681
+ .SYNOPSIS
2682
+ Sets the turtle width
2683
+ .DESCRIPTION
2684
+ Sets the Turtle viewbox width.
2685
+ .NOTES
2686
+ Once set, it will no longer be automatically computed.
2687
+ #>
2688
+ param(
2689
+ # The new viewbox width.
2690
+ [double]
2691
+ $Width
2692
+ )
2693
+
2694
+ $viewBox = $this.ViewBox
2695
+ $this.ViewBox = $viewBox[0],$viewBox[1],$width, $viewBox[-1]
2696
+
2697
+ </SetScriptBlock >
2698
+ </ScriptProperty >
2612
2699
<ScriptProperty >
2613
2700
<Name >X</Name >
2614
2701
<GetScriptBlock >
0 commit comments