Skip to content

Commit 5b92712

Browse files
feat: Turtle.get/set_Text ( Fixes #167 )
1 parent 50c909d commit 5b92712

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Types/Turtle/get_Text.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<#
2+
.SYNOPSIS
3+
Gets the Turtle text
4+
.DESCRIPTION
5+
Gets the text associated with the Turtle, if any exists.
6+
7+
#>
8+
return $this.'.Text'

Types/Turtle/set_Text.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<#
2+
.SYNOPSIS
3+
Sets the Turtle text
4+
.DESCRIPTION
5+
Sets the text displayed along the turtle path.
6+
7+
Once this property is set, a text element will be displayed along with the turtle path.
8+
9+
To display only text, please also set the path's stroke to `transparent`
10+
#>
11+
param(
12+
[string[]]
13+
$Text
14+
)
15+
16+
$this | Add-Member NoteProperty '.Text' -Force ($text -join ' ')

0 commit comments

Comments
 (0)