Skip to content

Commit 4b3bec1

Browse files
committed
Fix edge case with transforms
1 parent 5dca6a8 commit 4b3bec1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/WinUIBackend/WinUIBackend.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,14 @@ public final class WinUIBackend: AppBackend {
13461346
geo.transform = group
13471347
}
13481348
}
1349+
1350+
if geometry.size > 0,
1351+
let pathGeo = geometry.getAt(geometry.size - 1) as? PathGeometry,
1352+
pathGeo.figures.contains(where: { ($0?.segments.size ?? 0) > 0 })
1353+
{
1354+
// Start a new PathGeometry so that transforms don't apply going forward
1355+
geometry.append(PathGeometry())
1356+
}
13491357
case .subpath(let actions):
13501358
let subGeo = GeometryGroup()
13511359
applyActions(actions, to: subGeo.children)

0 commit comments

Comments
 (0)