@@ -1357,6 +1357,20 @@ if ($VerbosePreference -ne 'SilentlyContinue') {
1357
1357
}
1358
1358
</SetScriptBlock >
1359
1359
</ScriptProperty >
1360
+ <ScriptProperty >
1361
+ <Name >ID</Name >
1362
+ <GetScriptBlock >
1363
+ if ($this.'.ID') { return $this.'.ID'}
1364
+ return 'turtle'
1365
+
1366
+ </GetScriptBlock >
1367
+ <SetScriptBlock >
1368
+ param([string]$Value)
1369
+
1370
+ $this | Add-Member NoteProperty '.ID' $Value -Force
1371
+
1372
+ </SetScriptBlock >
1373
+ </ScriptProperty >
1360
1374
<ScriptProperty >
1361
1375
<Name >IsPenDown</Name >
1362
1376
<GetScriptBlock >
@@ -1435,7 +1449,7 @@ if ($chromeOutput -match '<img\ssrc="data:image/\w+;base64,(?<b64>[^"]+
1435
1449
$segments = @(
1436
1450
"< svg xmlns='http://www.w3.org/2000/svg' width='0%' height='0%'> "
1437
1451
"< defs> "
1438
- "< mask id='turtle -mask'> "
1452
+ "< mask id='$($this.Id) -mask'> "
1439
1453
$this.Symbol.OuterXml -replace '\< \?[^\> ]+\> '
1440
1454
"< /mask> "
1441
1455
"< /defs> "
@@ -1552,7 +1566,7 @@ $this | Add-Member -MemberType NoteProperty -Force -Name '.PathClass' -Value @(
1552
1566
<Name >PathElement</Name >
1553
1567
<GetScriptBlock >
1554
1568
@(
1555
- "< path id='turtle -path' d='$($this.PathData)' stroke='$(
1569
+ "< path id='$($this.id) -path' d='$($this.PathData)' stroke='$(
1556
1570
if ($this.Stroke) { $this.Stroke } else { 'currentColor' }
1557
1571
)' stroke-width='$(
1558
1572
if ($this.StrokeWidth) { $this.StrokeWidth } else { '0.1%' }
@@ -1663,7 +1677,7 @@ $b64 = [Convert]::ToBase64String($OutputEncoding.GetBytes($thisPattern.outerXml)
1663
1677
$segments = @(
1664
1678
"< svg xmlns='http://www.w3.org/2000/svg' width='0%' height='0%'> "
1665
1679
"< defs> "
1666
- "< mask id='turtle -mask'> "
1680
+ "< mask id='$($this.ID) -mask'> "
1667
1681
$this.Pattern.OuterXml -replace '\< \?[^\> ]+\> '
1668
1682
"< /mask> "
1669
1683
"< /defs> "
@@ -1872,15 +1886,15 @@ param()
1872
1886
1873
1887
@(
1874
1888
"< svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' transform-origin='50% 50%'> "
1875
- "< symbol id='turtle -symbol' viewBox='$($this.ViewBox)' transform-origin='50% 50%'> "
1889
+ "< symbol id='$($this.ID) -symbol' viewBox='$($this.ViewBox)' transform-origin='50% 50%'> "
1876
1890
$this.PathElement.OuterXml
1877
1891
"< /symbol> "
1878
1892
$(
1879
1893
if ($this.BackgroundColor) {
1880
1894
"< rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='$($this.BackgroundColor)' transform-origin='50% 50%' /> "
1881
1895
}
1882
1896
)
1883
- "< use href='#turtle -symbol' width='100%' height='100%' transform-origin='50% 50%' /> "
1897
+ "< use href='#$($this.ID) -symbol' width='100%' height='100%' transform-origin='50% 50%' /> "
1884
1898
"< /svg> "
1885
1899
) -join '' -as [xml]
1886
1900
</GetScriptBlock >
0 commit comments