RGBA protocol that affects Node's color and opacity.
More...
#include <CCProtocols.h>
RGBA protocol that affects Node's color and opacity.
virtual const Color3B& getColor |
( |
) | |
const |
|
pure virtual |
virtual const Color3B&
getDisplayedColor |
( |
) | |
const |
|
pure virtual |
virtual GLubyte getDisplayedOpacity |
( |
) | |
const |
|
pure virtual |
Returns the displayed opacity.
- Returns
- The opacity of sprite, from 0 ~ 255
Implemented in __NodeRGBA, and __LayerRGBA.
virtual GLubyte getOpacity |
( |
) | |
const |
|
pure virtual |
Returns the opacity.
The opacity which indicates how transparent or opaque this node is. 0 indicates fully transparent and 255 is fully opaque.
- Returns
- The opacity of sprite, from 0 ~ 255
Implemented in __NodeRGBA, and __LayerRGBA.
virtual bool isCascadeColorEnabled |
( |
) | |
const |
|
pure virtual |
virtual bool
isCascadeOpacityEnabled |
( |
) | |
const |
|
pure virtual |
virtual bool isOpacityModifyRGB |
( |
) | |
const |
|
pure virtual |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
- Returns
- Returns opacity modify flag.
Implemented in __NodeRGBA, and __LayerRGBA.
virtual void setCascadeColorEnabled |
( |
bool |
cascadeColorEnabled) | |
|
|
pure virtual |
virtual void
setCascadeOpacityEnabled |
( |
bool |
cascadeOpacityEnabled) | |
|
|
pure virtual |
virtual void setColor |
( |
const Color3B & |
color) | |
|
|
pure virtual |
Changes the color with R,G,B bytes.
- Parameters
-
color | Example: Color3B(255,100,0) means R=255, G=100, B=0 |
Implemented in __NodeRGBA, and __LayerRGBA.
virtual void setOpacity |
( |
GLubyte |
opacity) | |
|
|
pure virtual |
Changes the opacity.
- Parameters
-
opacity | Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent. |
Implemented in __NodeRGBA, and __LayerRGBA.
virtual void setOpacityModifyRGB |
( |
bool |
value) | |
|
|
pure virtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
- Parameters
-
value | If true, then the opacity will be applied as: glColor(R,G,B,opacity); If false, then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity); |
Implemented in __NodeRGBA, and __LayerRGBA.
virtual void updateDisplayedColor |
( |
const Color3B & |
color) | |
|
|
pure virtual |
virtual void updateDisplayedOpacity |
( |
GLubyte |
opacity) | |
|
|
pure virtual |
The documentation for this class was generated from the following file: