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

Code cleanup: allow None mouse_pos + clippy fixes

This commit is contained in:
Emil Ernerfeldt
2019-02-10 15:30:48 +01:00
parent 1beed16053
commit f0c879b2f4
9 changed files with 81 additions and 67 deletions

View File

@@ -1,3 +1,5 @@
#![allow(clippy::identity_op)]
const ANTI_ALIAS: bool = true;
const AA_SIZE: f32 = 0.5; // TODO: 1.0 / pixels_per_point
@@ -129,7 +131,7 @@ impl Frame {
let mut color_inner = color;
if thin_line {
// Fade out as it gets thinner:
color_inner.a = (color_inner.a as f32 * width).round() as u8;
color_inner.a = (f32::from(color_inner.a) * width).round() as u8;
}
// TODO: line caps ?
let mut i0 = n - 1;