Skip to content

Add regression for filtered groups with transformed children#497

Merged
wieslawsoltes merged 1 commit into
masterfrom
issue-464-filtered-group-transform
May 3, 2026
Merged

Add regression for filtered groups with transformed children#497
wieslawsoltes merged 1 commit into
masterfrom
issue-464-filtered-group-transform

Conversation

@wieslawsoltes
Copy link
Copy Markdown
Owner

PR Summary: Filtered Group With Transformed Child Regression

Summary

Adds regression coverage for GitHub issue #464, where a group with a filter could clip away a transformed child if the group bounds used for the filter region did not account for the child's transform.

Related Issue

Fixes/validates behavior for:

Changes

  • Added a focused retained scene graph regression test using the minimal SVG from the issue.
  • Verified that the filtered group's geometry bounds include the transformed circle:
    • left/top: 125
    • right/bottom: 375
  • Verified that the default object-bounding-box filter clip is derived from those transformed group bounds:
    • left/top: 100
    • right/bottom: 400
  • Verified that the transformed child actually renders at the center of the image instead of being clipped away.

Implementation Notes

No renderer code change was required. The current retained scene graph path already folds direct child transforms into structural group bounds before filter payload resolution. This PR locks that behavior down with a regression test so future bounds/filter changes do not reintroduce the issue.

Validation

Commands run locally:

dotnet format tests/Svg.Skia.UnitTests/Svg.Skia.UnitTests.csproj --no-restore --include tests/Svg.Skia.UnitTests/SvgRetainedSceneGraphTests.cs
dotnet test tests/Svg.Skia.UnitTests/Svg.Skia.UnitTests.csproj -f net10.0 -c Release --no-restore -p:IsTestProject=true --filter "FullyQualifiedName~SvgRetainedSceneGraphTests.RetainedSceneGraph_RendersFilteredGroupWithTransformedChild" --logger "console;verbosity=normal"
dotnet test tests/Svg.Skia.UnitTests/Svg.Skia.UnitTests.csproj -f net10.0 -c Release --no-restore -p:IsTestProject=true --filter "FullyQualifiedName~SvgRetainedSceneGraphTests" --logger "console;verbosity=minimal"
dotnet build Svg.Skia.slnx -c Release --no-restore
git diff --check

Results:

  • Focused regression test passed.
  • SvgRetainedSceneGraphTests passed: 82 passed, 0 failed, 0 skipped.
  • Solution build passed with pre-existing warnings and 0 errors.
  • git diff --check reported no whitespace errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant