Skip to content

Commit 94cf154

Browse files
author
James Brundage
committed
feat: Turtle.get/set_FillRule ( Fixes #109 )
1 parent d0fe873 commit 94cf154

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Types/Turtle/get_FillRule.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if (-not $this.'.PathAttribute') {
2+
$this | Add-Member -MemberType NoteProperty -Name '.PathAttribute' -Value ([Ordered]@{}) -Force
3+
}
4+
if ($this.'.PathAttribute'.'fill-rule') {
5+
return $this.'.PathAttribute'.'fill-rule'
6+
} else {
7+
'nonzero'
8+
}

Types/Turtle/set_FillRule.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
param(
2+
[ValidateSet('nonzero', 'evenodd')]
3+
[string]
4+
$fillRule = 'nonzero'
5+
)
6+
$this.PathAttribute = [Ordered]@{'fill-rule' = $fillRule.ToLower()}

0 commit comments

Comments
 (0)