diff --git a/src/azure.rs b/src/azure.rs index f2187c6..a31b1ea 100644 --- a/src/azure.rs +++ b/src/azure.rs @@ -253,6 +253,13 @@ pub struct struct__AzColor { pub type AzColor = struct__AzColor; +#[inline] +impl PartialEq for AzColor { + fn eq(&self, other: &AzColor) -> bool { + self.r == other.r && self.g == other.g && self.b == other.b && self.a == other.a + } +} + #[repr(C)] pub struct struct__AzGradientStop { pub offset: AzFloat, diff --git a/src/azure_hl.rs b/src/azure_hl.rs index 4d9723d..52c8140 100644 --- a/src/azure_hl.rs +++ b/src/azure_hl.rs @@ -125,6 +125,13 @@ impl Color { } } +#[inline] +impl PartialEq for Color { + fn eq(&self, other: &Color) -> bool { + self.r == other.r && self.g == other.g && self.b == other.b && self.a == other.a + } +} + // FIXME: Should have a class hierarchy here starting with Pattern. pub struct ColorPattern {