Skip to content

Commit 7aa86fd

Browse files
author
Thayer J Andrews
committed
CCEffectSaturation - API documentation
1 parent cd5724c commit 7aa86fd

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

cocos2d/CCEffectSaturation.h

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

99
#import "CCEffect.h"
1010

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

18+
/// -----------------------------------------------------------------------
19+
/// @name Accessing Effect Attributes
20+
/// -----------------------------------------------------------------------
21+
22+
/** The saturation adjustment value which is in the range [-1..1]. -1 completely
23+
* desaturates all affected pixels resulting in a grayscale image, 0 results in
24+
* no change, 1 results in an increase in saturation by 100%.
25+
*/
1326
@property (nonatomic) float saturation;
1427

28+
29+
/// -----------------------------------------------------------------------
30+
/// @name Initializing a CCEffectSaturation object
31+
/// -----------------------------------------------------------------------
32+
33+
/**
34+
* Initializes a CCEffectSaturation object with a saturation adjustment of 0.
35+
*
36+
* @return The CCEffecSaturation object.
37+
*/
1538
-(id)init;
39+
40+
/**
41+
* Initializes a CCEffectSaturation object with the supplied parameters.
42+
*
43+
* @param saturation The desired saturation adjustment.
44+
*
45+
* @return The CCEffectSaturation object.
46+
*/
1647
-(id)initWithSaturation:(float)saturation;
48+
49+
50+
/// -----------------------------------------------------------------------
51+
/// @name Creating a CCEffectSaturation object
52+
/// -----------------------------------------------------------------------
53+
54+
/**
55+
* Creates a CCEffectSaturation object with the supplied parameters.
56+
*
57+
* @param saturation The desired saturation adjustment.
58+
*
59+
* @return The CCEffectSaturation object.
60+
*/
1761
+(id)effectWithSaturation:(float)saturation;
1862

1963
@end

0 commit comments

Comments
 (0)