Skip to content

Commit c087d9e

Browse files
docs: `Turtle.set_PathAnimation docs ( re #117 )
1 parent 3820425 commit c087d9e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Types/Turtle/set_PathAnimation.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1+
<#
2+
.SYNOPSIS
3+
Sets the Turtle Path Animation
4+
.DESCRIPTION
5+
Sets an animation for the Turtle path.
6+
.EXAMPLE
7+
turtle flower PathAnimation ([Ordered]@{
8+
attributeName = 'fill' ; values = "#4488ff;#224488;#4488ff" ; repeatCount = 'indefinite'; dur = "4.2s" # ; additive = 'sum'
9+
}, [Ordered]@{
10+
attributeName = 'stroke' ; values = "#224488;#4488ff;#224488" ; repeatCount = 'indefinite'; dur = "2.1s" # ; additive = 'sum'
11+
}, [Ordered]@{
12+
type = 'rotate' ; values = 0, 360 ;repeatCount = 'indefinite'; dur = "41s"
13+
}) save ./AnimatedFlower.svg
14+
#>
115
param(
16+
# The path animation object.
17+
# This may be a string containing animation XML, XML, or a dictionary containing animation settings.
218
[PSObject]
319
$PathAnimation
420
)
@@ -30,6 +46,9 @@ $newAnimation = @(foreach ($animation in $PathAnimation) {
3046
if ($animation -is [string]) {
3147
$animation
3248
}
49+
if ($animation.OuterXml) {
50+
$animation.OuterXml
51+
}
3352
})
3453

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

0 commit comments

Comments
 (0)