1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Code cleanup

This commit is contained in:
Emil Ernerfeldt
2020-11-20 19:50:47 +01:00
parent ebf204a9ae
commit 99a2a52510
4 changed files with 167 additions and 137 deletions

View File

@@ -234,8 +234,7 @@ impl Painter {
}
let mut pixels: Vec<u8> = Vec::with_capacity(texture.pixels.len() * 4);
for &alpha in &texture.pixels {
let srgba = Srgba::white_alpha(alpha);
for srgba in texture.srgba_pixels() {
pixels.push(srgba.r());
pixels.push(srgba.g());
pixels.push(srgba.b());