Skip to content

Commit f68863f

Browse files
StartAutomatingStartAutomating
authored andcommitted
docs: `Turtle.set_PathAnimation docs ( re #117 )
1 parent c087d9e commit f68863f

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Turtle.types.ps1xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,23 @@ $this.PathAttribute = [Ordered]@{'opacity' = $Opacity}
19921992

19931993
</GetScriptBlock>
19941994
<SetScriptBlock>
1995-
param(
1995+
&lt;#
1996+
.SYNOPSIS
1997+
Sets the Turtle Path Animation
1998+
.DESCRIPTION
1999+
Sets an animation for the Turtle path.
2000+
.EXAMPLE
2001+
turtle flower PathAnimation ([Ordered]@{
2002+
attributeName = 'fill' ; values = "#4488ff;#224488;#4488ff" ; repeatCount = 'indefinite'; dur = "4.2s" # ; additive = 'sum'
2003+
}, [Ordered]@{
2004+
attributeName = 'stroke' ; values = "#224488;#4488ff;#224488" ; repeatCount = 'indefinite'; dur = "2.1s" # ; additive = 'sum'
2005+
}, [Ordered]@{
2006+
type = 'rotate' ; values = 0, 360 ;repeatCount = 'indefinite'; dur = "41s"
2007+
}) save ./AnimatedFlower.svg
2008+
#&gt;
2009+
param(
2010+
# The path animation object.
2011+
# This may be a string containing animation XML, XML, or a dictionary containing animation settings.
19962012
[PSObject]
19972013
$PathAnimation
19982014
)
@@ -2024,6 +2040,9 @@ $newAnimation = @(foreach ($animation in $PathAnimation) {
20242040
if ($animation -is [string]) {
20252041
$animation
20262042
}
2043+
if ($animation.OuterXml) {
2044+
$animation.OuterXml
2045+
}
20272046
})
20282047

20292048
$this | Add-Member -MemberType NoteProperty -Force -Name '.PathAnimation' -Value $newAnimation

0 commit comments

Comments
 (0)