cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
<CCRGBAProtocol> Protocol Referenceabstract

CC RGBA protocol. More...

#import <CCProtocols.h>

Inheritance diagram for <CCRGBAProtocol>:
Collaboration diagram for <CCRGBAProtocol>:

Instance Methods

(void) - setColor:
 
(ccColor3B- color
 
(GLubyte) - opacity
 returns the opacity
 
(void) - setOpacity:
 
(void) - setOpacityModifyRGB:
 
(BOOL) - doesOpacityModifyRGB
 

Detailed Description

CC RGBA protocol.

Method Documentation

- (ccColor3B) color

returns the color

Since
v0.8
- (BOOL) doesOpacityModifyRGB
optional

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

Since
v0.8
- (GLubyte) opacity

returns the opacity

- (void) setColor: (ccColor3B color

sets Color

Since
v0.8
- (void) setOpacity: (GLubyte)  opacity

sets the opacity.

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.
- (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

Since
v0.8

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