Skip to content
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

Allow RadialGradientBrush to use absolute radius size #3995

Closed
amwx opened this issue May 26, 2020 · 2 comments · Fixed by #14598
Closed

Allow RadialGradientBrush to use absolute radius size #3995

amwx opened this issue May 26, 2020 · 2 comments · Fixed by #14598
Labels
enhancement help-wanted A contribution from the community would be most welcome.

Comments

@amwx
Copy link
Contributor

amwx commented May 26, 2020

Would it be possible to allow the RadialGradientBrush to use an absolute size instead of relative? I'm not sure what's the best solution to offer, but something like RelativePoint or RelativeRect. I'd say RelativeSize, but since Radius is X-Y uniform, that might get confused with the Size struct.

I'm trying to implement a pseudo-Reveal effect, which uses the RadialGradientBrush, and the relative size leads to a non-uniform border effect when things are different sizes, e.g.

image

@Gillibald
Copy link
Contributor

Looks like this was already documented but somehow got lost:https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Visuals/Media/RadialGradientBrush.cs#L57

@Gillibald Gillibald added the help-wanted A contribution from the community would be most welcome. label May 26, 2020
@grokys
Copy link
Member

grokys commented Aug 25, 2021

Speaking about this with @wieslawsoltes and looks like this property controls this on WPF: https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.gradientbrush.mappingmode?view=net-5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help-wanted A contribution from the community would be most welcome.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants