Fix buggy text withviewports on monitors with different scales (#3666)

* Closes https://github.com/emilk/egui/issues/3664

Bonus: optimize color conversions and font atlas upload, especially in
debug builds.
This commit is contained in:
Emil Ernerfeldt
2023-11-30 15:56:05 +01:00
committed by GitHub
parent 61a7b90d5b
commit bd9bc252aa
13 changed files with 284 additions and 61 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ pub fn linear_u8_from_linear_f32(a: f32) -> u8 {
}
fn fast_round(r: f32) -> u8 {
(r + 0.5).floor() as _ // rust does a saturating cast since 1.45
(r + 0.5) as _ // rust does a saturating cast since 1.45
}
#[test]