Merge pull request #2749 from rhysd/const-from-rgb8

Make `Color::from_rgb8` and `Color::from_rgba8` const
This commit is contained in:
Héctor 2025-01-27 01:27:26 +01:00 committed by GitHub
commit da1726b134
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 28 additions and 93 deletions

View file

@ -423,7 +423,7 @@ impl Renderer {
renderer.fill_text(
text.clone(),
Point::new(11.0, 11.0 + 25.0 * i as f32),
Color::new(0.9, 0.9, 0.9, 1.0),
Color::from_rgba(0.9, 0.9, 0.9, 1.0),
Rectangle::with_size(Size::INFINITY),
);