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

Fixes relative brush mapping mode #14598

Merged
merged 17 commits into from
Feb 13, 2024
Merged

Conversation

kekekeks
Copy link
Member

@kekekeks kekekeks commented Feb 12, 2024

When designing Avalonia APIs and converting BrushMappingMode.RelativeToBoundingBox to RelativeUnit.Relative the "to boundling box" part was lost in translation.

So if a graphics primitive submitted to DrawingContext has a non-0:0 origin, the rendering is incorrect and sometimes doesn't render anything at all.

Fixes #10972
Fixes #3995

This PR also fixes RadialGradientBrush.Radius being forcefully treated as a relative value even if the rest of the brush is using absolute mapping mode.

This PR also adds separate RadiusX/RadiusY properties.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044859-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044865-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044869-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044877-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@jmacato jmacato enabled auto-merge February 13, 2024 10:09
@jmacato jmacato added this pull request to the merge queue Feb 13, 2024
Merged via the queue into master with commit 8329efd Feb 13, 2024
7 checks passed
@jmacato jmacato deleted the fixes/relative-mapping-mode-2 branch February 13, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants