-
Notifications
You must be signed in to change notification settings - Fork 686
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
update RadialGradientBrush property values to be ratios instead of percentages #2193
Comments
@ranjeshj it's all about proportions of the original size of the parent surface. We spent a lot of time in the Toolkit making sure we interoped 99% with the WPF brush in terms of the main properties (we just couldn't support absolute mapping mode), so we tried to make our documentation robust; you can see how we actually use the values to do the mapping in the brush itself here: I imagine since you're still using the same underlying composition technology that these should map pretty directly in terms of concepts, just that they need to be C++ instead of C#. I believe Jesse wasn't aware of this work during his initial implementation as a reference. Please let us know if you need any more info about the Toolkit implementation. |
@ranjeshj I would like to take this issue, if thats fine. @michael-hawker Unfortunately, the RadialGradientBrush uses the CompositionRadialGradientBrush which behaves differently than the WPF RadialGradientBrush does, e.g. to get the GradientOrigin to be starting in the top left, we had to transform the input to get that to work. But it should be fixable :) |
@chingucoding we used the Anyway, feel free to ping me on the discord server if you want to chat about anything for this topic. I implemented the brush in the Toolkit and am passionate about WPF interop for the community. 😊 |
@michael-hawker Thank you for that offer! 🦙 However I am not sure if there is actually anything do right now. It seems that the spec is just not correctly aligned with the source code right now. Setting Or am I missing something here? Edit: To clarify, it seems that this issue is already resolved with the current behavior. |
@MikeHillberg , @ranjeshj , @jesbis FYI |
I updated the spec:
Does that match? |
Yes that should be matching the current implementation. |
Yes. That is what i see as well. With the default mapping mode, this is accurate. |
Update property values to match the spec. See comment here..
The text was updated successfully, but these errors were encountered: