Skip to content

Commit cb5613b

Browse files
feat: Turtle.get_TextElement colors ( Fixes #292 )
1 parent 7ff406e commit cb5613b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Types/Turtle/get_TextElement.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,18 @@ if (-not $this.Steps) {
3131
$textAttributes['dominant-baseline'] = 'middle'
3232
$textAttributes['text-anchor'] = 'middle'
3333
$textAttributes['x'] = '50%'
34-
$textAttributes['y'] = '50%'
34+
$textAttributes['y'] = '50%'
3535
}
3636

37+
if ($this.fill -ne 'transparent') {
38+
$textAttributes['stroke'] = $this.stroke
39+
$textAttributes['fill'] = $this.fill
40+
} else {
41+
$textAttributes['fill'] = $this.stroke
42+
}
43+
44+
45+
3746
# Text Attributes can exist in Attribute or SVGAttribute, as long as they are prefixed.
3847
$prefix = '^/?text/'
3948
foreach ($collection in 'Attribute','SVGAttribute') {

0 commit comments

Comments
 (0)