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

Add static type for different coordinate systems and length units #2226

Closed
mbrubeck opened this issue Apr 24, 2014 · 0 comments
Closed

Add static type for different coordinate systems and length units #2226

mbrubeck opened this issue Apr 24, 2014 · 0 comments

Comments

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Apr 24, 2014

We currently use primitive types like int and f32 for measurements which may be in various coordinate planes with different origins and transforms (screen coordinates, window coordinates, framebuffer coordinates, page coordinates, layer coordinates) and in different units (CSS px, hardware pixels, device-independent "pixels", appunits).

We should add types for some or all of these, and statically-checked conversions between units and between coordinate systems. (Currently we have one such type, Au (appunit), which also defines conversions to untyped "px" and "pt" units.)

For comparison, here are some of the relevant types and functions in Gecko:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.