NTColor


@interface NTColor : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

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;

    Parameters

    object

    The reference object.

    Return Value

    True when objects are equal, false otherwise.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (NSUInteger)hash;

    Return Value

    The hash value of this object.

  • Constructs a completely opaque black color object.

    Declaration

    Objective-C

    - (id)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;

    Parameters

    r

    The red component. Must be between 0 and 255.

    g

    The green component. Must be between 0 and 255.

    b

    The blue component. Must be between 0 and 255.

    a

    The 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;

    Parameters

    color

    The color encoded into 32-bit integer as ARGB.

  • Checks for equality between this and another map color.

    Declaration

    Objective-C

    - (BOOL)isEqualInternal:(NTColor *)color;

    Parameters

    color

    The other map vector.

    Return Value

    True if equal.

  • Returns the red component of this map color.

    Declaration

    Objective-C

    - (unsigned char)getR;

    Return Value

    The red component in the [0..255] range.

  • Returns the green component of this map color.

    Declaration

    Objective-C

    - (unsigned char)getG;

    Return Value

    The green component in the [0..255] range.

  • Returns the blue component of this map color.

    Declaration

    Objective-C

    - (unsigned char)getB;

    Return Value

    The blue component in the [0..255] range.

  • Returns the alpha component of this map color.

    Declaration

    Objective-C

    - (unsigned char)getA;

    Return 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;

    Return Value

    The encoded 32-bit integer representation of this map color.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (int)hashInternal;

    Return Value

    The hash value of this object.

  • Creates a string representation of this map color, useful for logging.

    Declaration

    Objective-C

    - (NSString *)description;

    Return Value

    The string representation of this map color.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;