mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 16:12:58 +00:00
Add isEqual: to CPColor.
This commit is contained in:
1 parent
43af999d41
commit
b55140d50a
1 file changed
+11
@@ -475,6 +475,17 @@ url("data:image/png;base64,BASE64ENCODEDDATA") // if there is a pattern image
|
||||
return rgbToHex([self redComponent], [self greenComponent], [self blueComponent])
|
||||
}
|
||||
|
||||
- (BOOL)isEqual:(CPColor)aColor
|
||||
{
|
||||
if (!aColor)
|
||||
return NO;
|
||||
|
||||
if (aColor === self)
|
||||
return YES;
|
||||
|
||||
return [aColor isKindOfClass:CPColor] && [aColor cssString] === [self cssString];
|
||||
}
|
||||
|
||||
- (CPString)description
|
||||
{
|
||||
return [super description]+" "+[self cssString];
|
||||
|
||||
Reference in new issue
Block a user