Conforms to NSObject
Declared in CCProtocols.h

Overview

CC RGBA protocol

Tasks

  •   color

    sets and returns the color (tint)

    property required method
  •   displayedColor

    returns the displayed color

    property required method
  •   cascadeColorEnabled

    whether or not color should be propagated to its children

    property required method
  • – updateDisplayedColor:

    recursive method that updates display color

    required method
  •   opacity

    sets and returns the opacity.

    property required method
  •   displayedOpacity

    returns the displayed opacity

    property required method
  •   cascadeOpacityEnabled

    whether or not opacity should be propagated to its children

    property required method
  • – updateDisplayedOpacity:

    recursive method that updates the displayed opacity

    required method
  • – setOpacityModifyRGB:

    sets the premultipliedAlphaOpacity property. If set to NO then opacity will be applied as: glColor(R,G,B,opacity); If set to YES then opacity will be applied as: glColor(opacity, opacity, opacity, opacity ); Textures with premultiplied alpha will have this property by default on YES. Otherwise the default value is NO

  • – doesOpacityModifyRGB

    returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity);

Properties

cascadeColorEnabled

whether or not color should be propagated to its children

@property (nonatomic, getter=isCascadeColorEnabled) BOOL cascadeColorEnabled

Declared In

CCProtocols.h

cascadeOpacityEnabled

whether or not opacity should be propagated to its children

@property (nonatomic, getter=isCascadeOpacityEnabled) BOOL cascadeOpacityEnabled

Declared In

CCProtocols.h

color

sets and returns the color (tint)

@property (nonatomic) ccColor3B color

Availability

Declared In

CCProtocols.h

displayedColor

returns the displayed color

@property (nonatomic, readonly) ccColor3B displayedColor

Declared In

CCProtocols.h

displayedOpacity

returns the displayed opacity

@property (nonatomic, readonly) GLubyte displayedOpacity

Declared In

CCProtocols.h

opacity

sets and returns the opacity.

@property (nonatomic) GLubyte opacity

Discussion

Warning: If the the texture has premultiplied alpha then, the R, G and B channels will be modified. Values goes from 0 to 255, where 255 means fully opaque.

Declared In

CCProtocols.h

Instance Methods

doesOpacityModifyRGB

returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity);

- (BOOL)doesOpacityModifyRGB

Availability

Declared In

CCProtocols.h

setOpacityModifyRGB:

sets the premultipliedAlphaOpacity property. If set to NO then opacity will be applied as: glColor(R,G,B,opacity); If set to YES then opacity will be applied as: glColor(opacity, opacity, opacity, opacity ); Textures with premultiplied alpha will have this property by default on YES. Otherwise the default value is NO

- (void)setOpacityModifyRGB:(BOOL)boolean

Availability

Declared In

CCProtocols.h

updateDisplayedColor:

recursive method that updates display color

- (void)updateDisplayedColor:(ccColor3B)color

Declared In

CCProtocols.h

updateDisplayedOpacity:

recursive method that updates the displayed opacity

- (void)updateDisplayedOpacity:(GLubyte)opacity

Declared In

CCProtocols.h