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

Remove automatic pixel rounding from AspectRatio #141

Open
NickEntin opened this issue Oct 30, 2024 · 0 comments
Open

Remove automatic pixel rounding from AspectRatio #141

NickEntin opened this issue Oct 30, 2024 · 0 comments

Comments

@NickEntin
Copy link
Collaborator

NickEntin commented Oct 30, 2024

See #140 for original motivation:

A (much more breaking) alternative that might be worth considering here is removing pixel rounding from AspectRatio. I'd argue we're being a little too magical today with the rounding, since it's not clear whether your resulting size will be wider/taller than the intended aspect ratio with rounding applied. It would be nice to make any applied rounding more explicit, e.g.

aspectRatio.size(forWidth: ...).ceiledToPixel()

or

aspectRatio.size(forWidth: ...).flooredToPixel()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant