File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change
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
+ #>
1
15
param (
16
+ # The path animation object.
17
+ # This may be a string containing animation XML, XML, or a dictionary containing animation settings.
2
18
[PSObject ]
3
19
$PathAnimation
4
20
)
@@ -30,6 +46,9 @@ $newAnimation = @(foreach ($animation in $PathAnimation) {
30
46
if ($animation -is [string ]) {
31
47
$animation
32
48
}
49
+ if ($animation.OuterXml ) {
50
+ $animation.OuterXml
51
+ }
33
52
})
34
53
35
54
$this | Add-Member - MemberType NoteProperty - Force - Name ' .PathAnimation' - Value $newAnimation
You can’t perform that action at this time.
0 commit comments