Skip to content

Introduce DrawingContext Push/PopRenderOptions #12734

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

Merged
merged 4 commits into from
Aug 31, 2023

Conversation

Gillibald
Copy link
Contributor

@Gillibald Gillibald commented Aug 31, 2023

What does the pull request do?

public override void Render(DrawingContext context)
{
    using (context.PushRenderOptions(new RenderOptions { EdgeMode = EdgeMode.Aliased }))
    {
        context.DrawEllipse(....);
    }

    using (context.PushRenderOptions(new RenderOptions { EdgeMode = EdgeMode.Antialias }))
    {
        context.DrawEllipse(....)
    }
}

Screenshot 2023-08-31 072045

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

@avaloniaui-team
Copy link
Contributor

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

@avaloniaui-team
Copy link
Contributor

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

@Gillibald Gillibald added this pull request to the merge queue Aug 31, 2023
Merged via the queue into AvaloniaUI:master with commit 3cb9931 Aug 31, 2023
@Gillibald Gillibald deleted the feature/pushPopRenderOptions branch August 31, 2023 07:54
@grokys grokys added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Oct 2, 2023
grokys pushed a commit that referenced this pull request Oct 2, 2023
Introduce DrawingContext Push/PopRenderOptions
@grokys grokys added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Oct 14, 2023
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