Add a randomColor method. Useful for debugging.

This commit is contained in:
Ross Boucher
2009-05-23 17:28:21 -07:00
parent fff40499cc
commit cfa21b0c96
+9
View File
@@ -623,6 +623,15 @@ url("data:image/png;base64,BASE64ENCODEDDATA") // if there is a pattern image
@end
@implementation CPColor (Debugging)
+ (CPColor)randomColor
{
return [CPColor colorWithRed:RAND() green:RAND() blue:RAND() alpha:1.0];
}
@end
var CPColorComponentsKey = @"CPColorComponentsKey",
CPColorPatternImageKey = @"CPColorPatternImageKey";