-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Removes MappingMode from LinearGradientBrush in HasRealizationContextChanged #10506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes MappingMode from LinearGradientBrush in HasRealizationContextChanged #10506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
src/Microsoft.DotNet.Wpf/src/WpfGfx/core/resources/lineargradient.h
Outdated
Show resolved
Hide resolved
@dipeshmsft I don't think I agree with this change. Sure, it is unfortunate that it "does not work" with transformations but well, it is |
@h3xds1nz I came across this while fixing the borders in the new Fluent styles. WinUI uses the brush in the above syntax, and gets the expected behavior. I am not sure of there mechanism though. I will try to look for other ways for fixing the usage. |
I don't remember much honestly and will have to look once I am back travelling, but I don't think |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10506 +/- ##
=======================================
Coverage ? 11.55%
=======================================
Files ? 3214
Lines ? 648518
Branches ? 71516
=======================================
Hits ? 74915
Misses ? 572441
Partials ? 1162
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #10502
Description
As described in the issue description, LinearGradientBrushes ( LGB ) caches it bounds when we use Absolute MappingMode. However, when we apply transformations to the brush, the brush does not work work as expected. This PR removes the caching of the brush, thus resolving the issue.
Customer Impact
Developers using the LGB along with MappingMode=Absolute and RelativeTransform will get the correct behavior for the brush.
Regression
No
Testing
Not yet.
Risk
Microsoft Reviewers: Open in CodeFlow