Skip to content

Commit dcdd4e1

Browse files
author
Thayer J Andrews
committed
CCEffectHue - API documentation
1 parent 15eb61d commit dcdd4e1

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

cocos2d/CCEffectHue.h

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,59 @@
88

99
#import "CCEffect.h"
1010

11+
/**
12+
* CCEffectHue adjusts the hue of the sprite or effect node it is attached to.
13+
*
14+
*/
15+
1116
@interface CCEffectHue : CCEffect
1217

18+
/// -----------------------------------------------------------------------
19+
/// @name Accessing Effect Attributes
20+
/// -----------------------------------------------------------------------
21+
22+
/** The adjustment value that is used to shift the hue of the affected pixel colors. This
23+
* value is in the range [-180..180] and represents the angle of rotation of the color
24+
* values in the HSV color space. In HSV space, the color red is at 0 degrees, green is at
25+
* 120 degrees, and blue is at 240 degrees. So if you have a red sprite and you apply a
26+
* hue adjustment of 120 you will get a green sprite. Instead if you apply a hue adjustment
27+
* of -120 you will get a blue sprite.
28+
*/
1329
@property (nonatomic) float hue;
1430

31+
32+
/// -----------------------------------------------------------------------
33+
/// @name Initializing a CCEffectHue object
34+
/// -----------------------------------------------------------------------
35+
36+
/**
37+
* Initializes a CCEffectHue object with a hue adjustment of 0.
38+
*
39+
* @return The CCEffectHue object.
40+
*/
1541
-(id)init;
42+
43+
/**
44+
* Initializes a CCEffectHue object with the supplied parameters.
45+
*
46+
* @param hue The desired hue adjustment.
47+
*
48+
* @return The CCEffectHue object.
49+
*/
1650
-(id)initWithHue:(float)hue;
51+
52+
53+
/// -----------------------------------------------------------------------
54+
/// @name Creating a CCEffectHue object
55+
/// -----------------------------------------------------------------------
56+
57+
/**
58+
* Initializes a CCEffectHue object with the supplied parameters.
59+
*
60+
* @param hue The desired hue adjustment.
61+
*
62+
* @return The CCEffectHue object.
63+
*/
1764
+(id)effectWithHue:(float)hue;
1865

1966
@end

0 commit comments

Comments
 (0)