1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Pixel-perfect fonts

This commit is contained in:
Emil Ernerfeldt
2019-01-19 10:10:28 -06:00
parent cd8ca47e76
commit c2c94ddda5
14 changed files with 207 additions and 212 deletions

View File

@@ -17,6 +17,9 @@ pub struct RawInput {
/// Size of the screen in points.
pub screen_size: Vec2,
/// Also known as device pixel ratio, > 1 for HDPI screens.
pub pixels_per_point: f32,
}
/// What the gui maintains
@@ -36,6 +39,9 @@ pub struct GuiInput {
/// Size of the screen in points.
pub screen_size: Vec2,
/// Also known as device pixel ratio, > 1 for HDPI screens.
pub pixels_per_point: f32,
}
impl GuiInput {
@@ -46,6 +52,7 @@ impl GuiInput {
mouse_released: last.mouse_down && !new.mouse_down,
mouse_pos: new.mouse_pos,
screen_size: new.screen_size,
pixels_per_point: new.pixels_per_point,
}
}
}