mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Enable and fix a bunch more lints
This commit is contained in:
@@ -217,7 +217,7 @@ type FontIndex = usize;
|
||||
pub struct Font {
|
||||
fonts: Vec<Arc<FontImpl>>,
|
||||
/// Lazily calculated.
|
||||
characters: Option<std::collections::BTreeSet<char>>,
|
||||
characters: Option<BTreeSet<char>>,
|
||||
replacement_glyph: (FontIndex, GlyphInfo),
|
||||
pixels_per_point: f32,
|
||||
row_height: f32,
|
||||
@@ -382,7 +382,7 @@ fn allocate_glyph(
|
||||
}
|
||||
});
|
||||
|
||||
let offset_in_pixels = vec2(bb.min.x as f32, scale_in_pixels + bb.min.y as f32);
|
||||
let offset_in_pixels = vec2(bb.min.x, scale_in_pixels + bb.min.y);
|
||||
let offset = offset_in_pixels / pixels_per_point + y_offset * Vec2::Y;
|
||||
UvRect {
|
||||
offset,
|
||||
|
||||
@@ -104,11 +104,8 @@ impl TextureAtlas {
|
||||
for dx in -hw..=hw {
|
||||
for dy in -hw..=hw {
|
||||
let distance_to_center = ((dx * dx + dy * dy) as f32).sqrt();
|
||||
let coverage = remap_clamp(
|
||||
distance_to_center,
|
||||
(r as f32 - 0.5)..=(r as f32 + 0.5),
|
||||
1.0..=0.0,
|
||||
);
|
||||
let coverage =
|
||||
remap_clamp(distance_to_center, (r - 0.5)..=(r + 0.5), 1.0..=0.0);
|
||||
image[((x as i32 + hw + dx) as usize, (y as i32 + hw + dy) as usize)] =
|
||||
coverage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user