mirror of
https://github.com/a-b-street/abstreet.git
synced 2025-01-03 12:03:30 +03:00
f42b7c003c
Previously it was not clear (to me at least) when a value used in layout was in units of logical pixels vs physical pixels. This lead to some ambiguity about where to scale values, and lead to some values being scaled more than once or sometimes not at all, leading to inconsistent layouts across DPI's. The intent of this change is to solve this ambiguity by having the ui clients work *exlusively* with logical pixels. To achieve this, we consolidate all scaling to the graphics backend. We translate all PhysicalPositions from the windowing libraries to LogicalPixles. Our own types: ScreenPt, ScreenDim, etc. are all in logical units. In some places, I replaced passing raw floats with a corresponding Screen* type to clarify that the units are in logical pixels. |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml | ||
compare_screencaps.sh | ||
confirm_screencap.sh |