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 TileBrush transform handling #15157

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

Gillibald
Copy link
Contributor

@Gillibald Gillibald commented Mar 28, 2024

What does the pull request do?

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 changed the title Fixes TileBrush transform handling [WIP] Fixes TileBrush transform handling Mar 28, 2024
@BAndysc
Copy link
Contributor

BAndysc commented Mar 28, 2024

I went to see if maybe this PR also fixes #11959 (unfortunately doesn't look like)

But additionally, it renders incorrectly again: before the commit More adjustments

image

(might be related to my screen dpi?)

After the commit the grid is completely gone:

image

@Gillibald
Copy link
Contributor Author

Looks like there is no test coverage here. Can you provide me the brush definition that isn't working?

@BAndysc
Copy link
Contributor

BAndysc commented Mar 28, 2024

<DrawingBrush TileMode="Tile"
              DestinationRect="0 0 15 15">
    <DrawingBrush.Drawing>
        <GeometryDrawing Geometry="M0,0 L0,1 0.03,1 0.03,0.03 1,0.03 1,0 Z"
                         Brush="Red" />
    </DrawingBrush.Drawing>
</DrawingBrush>

even with no transform attached. It is completely blank after the latest commit. But it might be due to my screen scaling (macbook retina x2 scaling).

Regular grid is expected:

image

@Gillibald
Copy link
Contributor Author

The PR currently does not handle all Stretch modes that might cause this. Thanks for the sample.

@avaloniaui-bot
Copy link

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

@Gillibald Gillibald force-pushed the fixes/tiledBrushTransform branch 2 times, most recently from d215e12 to 2e02a1c Compare March 28, 2024 14:33
@Gillibald Gillibald force-pushed the fixes/tiledBrushTransform branch from 2e02a1c to 97c115a Compare March 28, 2024 14:35
@Gillibald Gillibald changed the title [WIP] Fixes TileBrush transform handling Fixes TileBrush transform handling Mar 28, 2024
@avaloniaui-bot
Copy link

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

@maxkatz6 maxkatz6 requested a review from kekekeks March 28, 2024 22:10
@avaloniaui-bot
Copy link

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

@maxkatz6 maxkatz6 added this pull request to the merge queue Apr 2, 2024
Merged via the queue into AvaloniaUI:master with commit 23b3a76 Apr 2, 2024
10 checks passed
@Gillibald Gillibald deleted the fixes/tiledBrushTransform branch April 9, 2024 12:17
@maxkatz6 maxkatz6 added the backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch label Apr 18, 2024
maxkatz6 pushed a commit that referenced this pull request Apr 20, 2024
#Conflicts:
#	src/Skia/Avalonia.Skia/DrawingContextImpl.cs
@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.

4 participants