Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

GTK: fix small arc rendering problem #15131

Merged
merged 1 commit into from
Feb 14, 2022
Merged

Conversation

knocte
Copy link
Contributor

@knocte knocte commented Feb 8, 2022

GeometryHelper.FlattenArc function returns a NaN point when
flattening very small arcs. Cairo doesn't ignore NaN points
and would draw an out-of-place line instead, which we need
to tweak to prevent weird renderings.

Co-authored-by: Afshin Arani [email protected]

Description of Change

Issues Resolved

API Changes

None

Platforms Affected

  • Gtk

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

Testing Procedure

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

GeometryHelper.FlattenArc function returns a NaN point when
flattening very small arcs. Cairo doesn't ignore NaN points
and would draw an out-of-place line instead, which we need
to tweak to prevent weird renderings.

Fixes xamarin#15130

Co-authored-by: Afshin Arani <[email protected]>
@knocte knocte requested a review from jsuarezruiz as a code owner February 8, 2022 13:28
@jfversluis
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

knocte added a commit to nblockchain/DotNetForms that referenced this pull request Feb 9, 2022
GeometryHelper.FlattenArc function returns a NaN point when
flattening very small arcs. Cairo doesn't ignore NaN points
and would draw an out-of-place line instead, which we need
to tweak to prevent weird renderings.

Fixes xamarin#15130

Upstream PR: xamarin#15131

Co-authored-by: Afshin Arani <[email protected]>
@jfversluis
Copy link
Member

Hey @knocte thanks for another great contribution! Would you be able to test the resulting NuGet from this build to verify if it has the desired outcome? Thanks!

knocte added a commit to nblockchain/geewallet that referenced this pull request Feb 9, 2022
@knocte
Copy link
Contributor Author

knocte commented Feb 10, 2022

@jfversluis do you ask me that in case we haven't tested the fix? We did test the fix, even with our own nuget package (https://www.nuget.org/packages/DotNetForms.Platform.GTK), because we cannot wait for Microsoft to release next SR, so we create it ourselves :)

@jfversluis
Copy link
Member

I assume that you're testing it! I would love for you to test it out with the NuGet that is on this PR to verify that it also works in this case and nothing got mixed up somehow in between. The instructions are here. The version for this case is 5.0.0.8026. If you would be willing to double-check that would be greatly appreciated!

@jfversluis jfversluis merged commit 60d61f5 into xamarin:5.0.0 Feb 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] (Gtk) Cheese chart ends up having weird rendering
2 participants