MSFColor
Objective-C
@interface MSFColor : NSObject {
void *swigCPtr;
BOOL swigCMemOwn;
}
Swift
class MSFColor : NSObject
A color represented in RGBA space, alpha is expected to be non-premultiplied.
-
Checks if this object is equal to the specified object.
Declaration
Objective-C
- (BOOL)isEqual:(id)object;Swift
func isEqual(_ object: Any!) -> BoolParameters
objectThe reference object.
Return Value
True when objects are equal, false otherwise.
-
Returns the hash value of this object.
Declaration
Objective-C
- (NSUInteger)hash;Swift
func hash() -> UIntReturn Value
The hash value of this object.
-
Constructs a completely opaque black color object.
Declaration
Objective-C
- (id)init;Swift
init!() -
Constructs a map color object from the red, green, blue and alpha components. Alpha component is interpreted as non-premultiplied transparency value, thus to make half-transparent green, use Color(0, 255, 0, 128).
Declaration
Objective-C
- (id)initWithR:(unsigned char)r g:(unsigned char)g b:(unsigned char)b a:(unsigned char)a;Swift
init!(r: UInt8, g: UInt8, b: UInt8, a: UInt8)Parameters
rThe red component. Must be between 0 and 255.
gThe green component. Must be between 0 and 255.
bThe blue component. Must be between 0 and 255.
aThe alpha component. Must be between 0 and 255.
-
Constructs a map color object from a 32-bit encoded integer. The format is expected to be ARGB.
Declaration
Objective-C
- (id)initWithColor:(int)color;Swift
init!(color: Int32)Parameters
colorThe color encoded into 32-bit integer as ARGB.
-
Checks for equality between this and another map color.
Declaration
Objective-C
- (BOOL)isEqualInternal:(MSFColor *)color;Swift
func isEqualInternal(_ color: MSFColor!) -> BoolParameters
colorThe other map vector.
Return Value
True if equal.
-
Returns the red component of this map color.
Declaration
Objective-C
- (unsigned char)getR;Swift
func getR() -> UInt8Return Value
The red component in the [0..255] range.
-
Returns the green component of this map color.
Declaration
Objective-C
- (unsigned char)getG;Swift
func getG() -> UInt8Return Value
The green component in the [0..255] range.
-
Returns the blue component of this map color.
Declaration
Objective-C
- (unsigned char)getB;Swift
func getB() -> UInt8Return Value
The blue component in the [0..255] range.
-
Returns the alpha component of this map color.
Declaration
Objective-C
- (unsigned char)getA;Swift
func getA() -> UInt8Return Value
The alpha component in the [0..255] range.
-
Encodes this map color into 32-bit integer value (ARGB format).
Declaration
Objective-C
- (int)getARGB;Swift
func getARGB() -> Int32Return Value
The encoded 32-bit integer representation of this map color.
-
Returns the hash value of this object.
Declaration
Objective-C
- (int)hashInternal;Swift
func hashInternal() -> Int32Return Value
The hash value of this object.
-
Creates a string representation of this map color, useful for logging.
Declaration
Objective-C
- (NSString *)description;Swift
func description() -> String!Return Value
The string representation of this map color.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()