mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Create gray -> grey doc aliases (#5362)
As someone who uses "grey" instead of "gray", it is annoying that my autocomplete can never find any of the "gray" color related things, so this adds doc aliases for that. * [x] I have followed the instructions in the PR template
This commit is contained in:
@@ -124,6 +124,7 @@ impl ColorImage {
|
||||
/// Create a [`ColorImage`] from iterator over flat opaque gray data.
|
||||
///
|
||||
/// Panics if `size[0] * size[1] != gray_iter.len()`.
|
||||
#[doc(alias = "from_grey_iter")]
|
||||
pub fn from_gray_iter(size: [usize; 2], gray_iter: impl Iterator<Item = u8>) -> Self {
|
||||
let pixels: Vec<_> = gray_iter.map(Color32::from_gray).collect();
|
||||
assert_eq!(size[0] * size[1], pixels.len());
|
||||
|
||||
Reference in New Issue
Block a user