mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 08:08:13 +08:00
Impl byte size function for Color (#1141)
This commit is contained in:
@@ -60,6 +60,9 @@ impl Pixel for Color {
|
|||||||
fn from_bytes(bytes: &[u8]) -> Self {
|
fn from_bytes(bytes: &[u8]) -> Self {
|
||||||
Color::from_rgba8_srgb(bytes[0], bytes[1], bytes[2], bytes[3])
|
Color::from_rgba8_srgb(bytes[0], bytes[1], bytes[2], bytes[3])
|
||||||
}
|
}
|
||||||
|
fn byte_size() -> usize {
|
||||||
|
4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Alpha for Color {
|
impl Alpha for Color {
|
||||||
|
|||||||
Reference in New Issue
Block a user