feat(Skia): Implement PlaneProjection and Matrix3DProjection#22449
feat(Skia): Implement PlaneProjection and Matrix3DProjection#22449MartinZikmund merged 18 commits intomasterfrom
PlaneProjection and Matrix3DProjection#22449Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements 3D perspective projection support for Skia targets by adding PlaneProjection and Matrix3DProjection classes. These features allow UIElements to be transformed in 3D space with perspective effects, addressing a long-standing feature request from issue #181.
Changes:
- Implements
Projectionbase class and two concrete implementations:PlaneProjection(for common 3D rotations and offsets) andMatrix3DProjection(for custom 4x4 matrices) - Adds
Projectiondependency property toUIElementfor Skia targets - Implements complete
Matrix3Dstruct with operators, equality, and conversion methods - Integrates projection transforms into the rendering pipeline via
NativeRenderTransformAdapter - Includes comprehensive runtime tests and interactive sample applications
Reviewed changes
Copilot reviewed 16 out of 20 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| Projection.cs | Base class for all projection types with owner tracking and change notifications |
| PlaneProjection.cs | Implements perspective transforms with rotation, center of rotation, and offset properties |
| Matrix3DProjection.cs | Allows custom 4x4 transformation matrices |
| Matrix3D.cs | Complete 4x4 matrix struct implementation with multiplication, inversion, and conversion |
| UIElement.cs | Adds Projection property for Skia with event handling and transform updates |
| UIElement.skia.cs | Updates layout arrangement to handle projection calculations |
| NativeRenderTransformAdapter.skia.cs | Integrates projection matrices into the render transform pipeline |
| Generated files | Updates conditional compilation to exclude Skia from NotImplemented attributes |
| Given_PlaneProjection.cs | Comprehensive unit tests for PlaneProjection functionality |
| Given_Matrix3DProjection.cs | Unit tests for Matrix3DProjection |
| Given_Matrix3D.cs | Tests for Matrix3D struct operations |
| PlaneProjection_Basic.xaml | Interactive sample demonstrating all PlaneProjection features |
| Matrix3DProjection_Basic.xaml | Sample showing custom matrix transformations |
| CompositionColorBrush.skia.cs | Enables anti-aliasing (appears unrelated to PR) |
| UITests.Shared.projitems | Adds new sample files to project |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Media/Projection/PlaneProjection_Basic.xaml
Show resolved
Hide resolved
src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Media/Matrix3DProjection.cs
Show resolved
Hide resolved
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_PlaneProjection.cs
Outdated
Show resolved
Hide resolved
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22449/docs/index.html |
|
The build 192769 found UI Test snapshots differences: Details
|
|
The build 192769 found UI Test snapshots differences: Details
|
|
The build 192769 found UI Test snapshots differences: Details
|
9208616 to
5f29a9c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 20 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_Matrix3D.cs
Outdated
Show resolved
Hide resolved
|
The build 195090 found UI Test snapshots differences: Details
|
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22449/docs/index.html |
|
The build 195090 found UI Test snapshots differences: Details
|
|
The build 195090 found UI Test snapshots differences: Details
|
ee79dc4 to
cc88eb0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 20 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The build 196837 found UI Test snapshots differences: Details
|
|
The build 196837 found UI Test snapshots differences: Details
|
|
The build 196837 found UI Test snapshots differences: Details
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 20 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22449/wasm-skia-net9/index.html |
|
The build 196937 found UI Test snapshots differences: Details
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 21 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_Matrix3DProjection.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 21 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 21 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22449/wasm-skia-net9/index.html |
src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Media/Projection/Matrix3DProjection_Basic.xaml.cs
Show resolved
Hide resolved
|
The build 197819 found UI Test snapshots differences: Details
|
|
The build 197819 found UI Test snapshots differences: Details
|
Co-authored-by: Xiaotian Gu <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 21 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 21 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22449/wasm-skia-net9/index.html |
|
The build 197899 found UI Test snapshots differences: Details
|
|
The build 197899 found UI Test snapshots differences: Details
|
GitHub Issue: closes #181
PR Type: ✨ Feature
What is the current behavior? 🤔
Not implemented
What is the new behavior? 🚀
Implemented
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.