cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
<CCRGBAProtocol> Protocol Reference

CC RGBA protocol. More...

#import <CCProtocols.h>

+ Inheritance diagram for <CCRGBAProtocol>:

List of all members.

Public Member Functions

(void) - updateDisplayedColor:
(void) - updateDisplayedOpacity:
(void) - setOpacityModifyRGB:
(BOOL) - doesOpacityModifyRGB


ccColor3B color
ccColor3B displayedColor
BOOL cascadeColorEnabled
GLubyte opacity
GLubyte displayedOpacity
BOOL cascadeOpacityEnabled

Detailed Description

CC RGBA protocol.

Member Function Documentation

- (BOOL) doesOpacityModifyRGB [optional]

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

- (void) setOpacityModifyRGB: (BOOL)  boolean [optional]

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) updateDisplayedColor: (ccColor3B color

recursive method that updates display color

- (void) updateDisplayedOpacity: (GLubyte)  opacity

recursive method that updates the displayed opacity

Property Documentation

- (BOOL) cascadeColorEnabled [read, write, assign]

whether or not color should be propagated to its children

- (BOOL) cascadeOpacityEnabled [read, write, assign]

whether or not opacity should be propagated to its children

- (ccColor3B) color [read, write, assign]

sets and returns the color (tint)


Reimplemented in CCLabelBMFont, and CCAtlasNode.

- (ccColor3B) displayedColor [read, assign]

returns the displayed color

- (GLubyte) displayedOpacity [read, assign]

returns the displayed opacity

- (GLubyte) opacity [read, write, assign]

sets and returns the opacity.

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.

Reimplemented in CCLabelBMFont.

The documentation for this protocol was generated from the following file: