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

Rename Srgba to Color32

This commit is contained in:
Emil Ernerfeldt
2021-01-02 17:02:18 +01:00
parent 4fc12bf324
commit 73f3d8cf46
31 changed files with 198 additions and 193 deletions

View File

@@ -129,7 +129,7 @@ impl FractalClock {
];
let scale = self.zoom * rect.width().min(rect.height());
let paint_line = |points: [Pos2; 2], color: Srgba, width: f32| {
let paint_line = |points: [Pos2; 2], color: Color32, width: f32| {
let line = [
rect.center() + scale * points[0].to_vec2(),
rect.center() + scale * points[1].to_vec2(),
@@ -161,7 +161,7 @@ impl FractalClock {
for (i, hand) in hands.iter().enumerate() {
let center = pos2(0.0, 0.0);
let end = center + hand.vec;
paint_line([center, end], Srgba::additive_luminance(255), width);
paint_line([center, end], Color32::additive_luminance(255), width);
if i < 2 {
nodes.push(Node {
pos: end,
@@ -191,7 +191,7 @@ impl FractalClock {
};
paint_line(
[a.pos, b.pos],
Srgba::additive_luminance(luminance_u8),
Color32::additive_luminance(luminance_u8),
width,
);
new_nodes.push(b);