mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Rename Srgba to Color32
This commit is contained in:
@@ -2,7 +2,7 @@ use std::time::Instant;
|
||||
|
||||
use crate::{storage::WindowSettings, *};
|
||||
|
||||
pub use egui::Srgba;
|
||||
pub use egui::Color32;
|
||||
|
||||
const EGUI_MEMORY_KEY: &str = "egui";
|
||||
const WINDOW_KEY: &str = "window";
|
||||
@@ -16,7 +16,7 @@ impl epi::TextureAllocator for Painter {
|
||||
&mut self,
|
||||
id: egui::TextureId,
|
||||
size: (usize, usize),
|
||||
srgba_pixels: &[Srgba],
|
||||
srgba_pixels: &[Color32],
|
||||
) {
|
||||
self.set_user_texture(id, size, srgba_pixels);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ use {
|
||||
egui::{
|
||||
math::clamp,
|
||||
paint::{PaintJobs, Triangles},
|
||||
Rect, Srgba,
|
||||
Color32, Rect,
|
||||
},
|
||||
glium::{
|
||||
implement_vertex,
|
||||
@@ -109,7 +109,7 @@ impl Painter {
|
||||
.chunks(texture.width as usize)
|
||||
.map(|row| {
|
||||
row.iter()
|
||||
.map(|&a| Srgba::white_alpha(a).to_tuple())
|
||||
.map(|&a| Color32::white_alpha(a).to_tuple())
|
||||
.collect()
|
||||
})
|
||||
.collect();
|
||||
@@ -282,7 +282,7 @@ impl Painter {
|
||||
&mut self,
|
||||
id: egui::TextureId,
|
||||
size: (usize, usize),
|
||||
pixels: &[Srgba],
|
||||
pixels: &[Color32],
|
||||
) {
|
||||
assert_eq!(size.0 * size.1, pixels.len());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user