Debian Codegraph @

.cargo/vendor/rgb/src/formats/argb.rs

raw
1 #[repr(C)]
2 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3 #[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
4 #[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
5 /// An `Alpha + Red + Green + Blue` pixel.
6 ///
7 /// # Examples
8 ///
9 /// ```
10 /// use rgb::Argb;
11 ///
12 /// let pixel: Argb<u8> = Argb { a: 255, r: 0, g: 0, b: 0 };
13 /// ```
14 pub struct Argb<T, A = T> {
15 /// Alpha Component
16 pub a: A,
17 /// Red Component
18 pub r: T,
19 /// Green Component
20 pub g: T,
21 /// Blue Component
22 pub b: T,
23 }