Skip to content

Commit 20550c7

Browse files
author
Thayer J Andrews
committed
CCEffectContrast - API documentation
1 parent ddf2529 commit 20550c7

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

cocos2d/CCEffectContrast.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+
* CCEffectContrast adjusts the contrast of the sprite or effect node
13+
* it is attached to.
14+
*
15+
*/
16+
1117
@interface CCEffectContrast : CCEffect
1218

19+
/// -----------------------------------------------------------------------
20+
/// @name Accessing Effect Attributes
21+
/// -----------------------------------------------------------------------
22+
23+
/** The contrast adjustment value that is used to scale the pixel colors of the
24+
* affected node. This value is in the range [-1..1], and the napping of this value
25+
* to the color scale factor is: pow(4.0, contrast). This means that
26+
* an adjustment value of -1 scales the affected color by 0.25, 0 results in no
27+
* change, and 1 scales the affected color by 4.
28+
*/
1329
@property (nonatomic) float contrast;
1430

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

1966
@end

0 commit comments

Comments
 (0)