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/drawing brush transform #14978

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

Gillibald
Copy link
Contributor

@Gillibald Gillibald commented Mar 14, 2024

What does the pull request do?

This PR ensures a brush transform is applied to the brush's content instead of on the resulting platform brush.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@Gillibald Gillibald requested a review from kekekeks March 14, 2024 12:28
@avaloniaui-bot
Copy link

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

@Gillibald Gillibald added this pull request to the merge queue Mar 15, 2024
Merged via the queue into AvaloniaUI:master with commit 6eb9d7a Mar 15, 2024
6 checks passed
@Gillibald Gillibald deleted the fixes/drawingBrushTransform branch March 15, 2024 09:05
@@ -1186,15 +1191,6 @@ private void ConfigureTileBrush(ref PaintWrapper paintWrapper, Rect targetBox, I
paintTransform = SKMatrix.Concat(paintTransform,
SKMatrix.CreateScale((float)(96.0 / _intermediateSurfaceDpi.X), (float)(96.0 / _intermediateSurfaceDpi.Y)));

if (tileBrush.Transform is { })
{
var origin = tileBrush.TransformOrigin.ToPixels(targetRect);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transform origin shouldn't be ignored

@BAndysc
Copy link
Contributor

BAndysc commented Mar 25, 2024

I am afraid this PR breaks some things @Gillibald

Before the PR (matches WPF):
before

After the PR:
now

#15114

@maxkatz6 maxkatz6 added the backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch label Apr 6, 2024
maxkatz6 pushed a commit that referenced this pull request Apr 6, 2024
* Apply brush transform to SKPicture instead to the local matrix of the resulting SKShader

* Add unit test
Implement Direct2D1
@maxkatz6 maxkatz6 added backported-11.1.x and removed backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants