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

Ovals drawing improperly #98

Open
gskinner opened this issue Jan 16, 2021 · 0 comments
Open

Ovals drawing improperly #98

gskinner opened this issue Jan 16, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@gskinner
Copy link
Collaborator

Bug Description

Ovals translated into Containers are drawing incorrectly (see image below). This is due to a recent change in Flutter where elliptical corners are now drawn differently.

We previously set oval corner x & y radii to 9999.0, to ensure corners would draw to the full extent in both dimensions, even when the shape scales. Now though, it appears to calculate the ratio of the two dimensions and then multiply the shorter dimension by that ratio to calculate the longer dimension.

Ex. a 50 x 100 Container, with radius x=50, y=50, would result in a circular corner of radius 25 (the maximum radius along the shortest side 25 times the ratio 50 / 50 = 1.0). With radius x=50, y=75, the corner would be drawn with an x radius of 25 (half the width), and a y radius of 37.5 (75/50 * 25). Formerly it would have been drawn with a y radius of 100, since 75 is greater than the max radius of 100/2=50.

image
Flutter on top, XD on bottom.

We can partially work around this by maintaining the ratio, but it will break if the oval is scaled non-uniformly.

@gskinner gskinner added the bug Something isn't working label Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant