File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -1687,6 +1687,42 @@ return ([pscustomobject]@{ X = 0; Y = 0 })
1687
1687
"offset-path: $($this.PathData);"
1688
1688
</GetScriptBlock >
1689
1689
</ScriptProperty >
1690
+ <ScriptProperty >
1691
+ <Name >Opacity</Name >
1692
+ <GetScriptBlock >
1693
+ < #
1694
+ .SYNOPSIS
1695
+ Gets the turtle opacity
1696
+ .DESCRIPTION
1697
+ Gets the opacity of the turtle path.
1698
+ #>
1699
+ if (-not $this.'.PathAttribute') {
1700
+ $this | Add-Member -MemberType NoteProperty -Name '.PathAttribute' -Value ([Ordered]@{}) -Force
1701
+ }
1702
+ if ($this.'.PathAttribute'.'opacity') {
1703
+ return $this.'.PathAttribute'.'opacity'
1704
+ } else {
1705
+ return 1.0
1706
+ }
1707
+ </GetScriptBlock >
1708
+ <SetScriptBlock >
1709
+ < #
1710
+ .SYNOPSIS
1711
+ Sets the opacity
1712
+ .DESCRIPTION
1713
+ Sets the opacity of the path
1714
+ .EXAMPLE
1715
+ turtle forward 100 opacity 0.5 save ./dimLine.svg
1716
+ #>
1717
+ param(
1718
+ [double]
1719
+ $Opacity = 'nonzero'
1720
+ )
1721
+
1722
+ $this.PathAttribute = [Ordered]@{'opacity' = $Opacity}
1723
+
1724
+ </SetScriptBlock >
1725
+ </ScriptProperty >
1690
1726
<ScriptProperty >
1691
1727
<Name >PathAttribute</Name >
1692
1728
<GetScriptBlock >
You can’t perform that action at this time.
0 commit comments