Skip to content

Commit a38b00c

Browse files
author
James Brundage
committed
feat: Turtle.get_Points ( Fixes #12 )
2 parents 98fe74c + e12d406 commit a38b00c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Turtle.types.ps1xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,33 @@ return ([pscustomobject]@{ X = 0; Y = 0 })
8484
return ([pscustomobject]@{ X = 0; Y = 0 })
8585
</GetScriptBlock>
8686
</ScriptProperty>
87+
<ScriptProperty>
88+
<Name>PathData</Name>
89+
<GetScriptBlock>
90+
@(
91+
@(
92+
93+
if ($this.Start.X -and $this.Start.Y) {
94+
"m $($this.Start.x) $($this.Start.y)"
95+
}
96+
else {
97+
@("m"
98+
if ($this.Minimum.X -lt 0) {
99+
-1 * $this.Minimum.X
100+
} else {
101+
0
102+
}
103+
if ($this.Minimum.Y -lt 0) {
104+
-1 * $this.Minimum.Y
105+
} else {
106+
0
107+
}) -join ' '
108+
}
109+
) + $this.Steps
110+
# @("m $($this.Start.x) $($this.Start.y) ") + $this.Steps
111+
) -join ' '
112+
</GetScriptBlock>
113+
</ScriptProperty>
87114
<ScriptProperty>
88115
<Name>Position</Name>
89116
<GetScriptBlock>

0 commit comments

Comments
 (0)