1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Update MSRV to Rust 1.72 (#3595)

Required to update to puffin 0.18
This commit is contained in:
Emil Ernerfeldt
2023-11-21 17:26:35 +01:00
committed by GitHub
parent 7abf8afd16
commit bfadb90d42
48 changed files with 206 additions and 190 deletions

View File

@@ -273,15 +273,18 @@ impl FontImpl {
if glyph_width == 0 || glyph_height == 0 {
UvRect::default()
} else {
let atlas = &mut self.atlas.lock();
let (glyph_pos, image) = atlas.allocate((glyph_width, glyph_height));
glyph.draw(|x, y, v| {
if v > 0.0 {
let px = glyph_pos.0 + x as usize;
let py = glyph_pos.1 + y as usize;
image[(px, py)] = v;
}
});
let glyph_pos = {
let atlas = &mut self.atlas.lock();
let (glyph_pos, image) = atlas.allocate((glyph_width, glyph_height));
glyph.draw(|x, y, v| {
if 0.0 < v {
let px = glyph_pos.0 + x as usize;
let py = glyph_pos.1 + y as usize;
image[(px, py)] = v;
}
});
glyph_pos
};
let offset_in_pixels = vec2(bb.min.x, bb.min.y);
let offset =