mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Rename Srgba to Color32
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::*;
|
||||
|
||||
pub use egui::{pos2, Srgba};
|
||||
pub use egui::{pos2, Color32};
|
||||
use http::WebHttp;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -75,7 +75,7 @@ impl epi::TextureAllocator for webgl::Painter {
|
||||
&mut self,
|
||||
id: egui::TextureId,
|
||||
size: (usize, usize),
|
||||
srgba_pixels: &[Srgba],
|
||||
srgba_pixels: &[Color32],
|
||||
) {
|
||||
self.set_user_texture(id, size, srgba_pixels);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use {
|
||||
|
||||
use egui::{
|
||||
math::clamp,
|
||||
paint::{PaintJobs, Srgba, Texture, Triangles},
|
||||
paint::{Color32, PaintJobs, Texture, Triangles},
|
||||
vec2,
|
||||
};
|
||||
|
||||
@@ -182,7 +182,7 @@ impl Painter {
|
||||
&mut self,
|
||||
id: egui::TextureId,
|
||||
size: (usize, usize),
|
||||
srgba_pixels: &[Srgba],
|
||||
srgba_pixels: &[Color32],
|
||||
) {
|
||||
assert_eq!(size.0 * size.1, srgba_pixels.len());
|
||||
|
||||
@@ -328,7 +328,7 @@ impl Painter {
|
||||
self.canvas.width() as i32,
|
||||
self.canvas.height() as i32,
|
||||
);
|
||||
let clear_color: Srgba = clear_color.into();
|
||||
let clear_color: Color32 = clear_color.into();
|
||||
gl.clear_color(
|
||||
clear_color[0] as f32 / 255.0,
|
||||
clear_color[1] as f32 / 255.0,
|
||||
|
||||
Reference in New Issue
Block a user