|
8 | 8 |
|
9 | 9 | #import "CCEffect.h"
|
10 | 10 |
|
| 11 | +/** |
| 12 | + * CCEffectContrast adjusts the contrast of the sprite or effect node |
| 13 | + * it is attached to. |
| 14 | + * |
| 15 | + */ |
| 16 | + |
11 | 17 | @interface CCEffectContrast : CCEffect
|
12 | 18 |
|
| 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 | + */ |
13 | 29 | @property (nonatomic) float contrast;
|
14 | 30 |
|
| 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 | + */ |
15 | 41 | -(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 | + */ |
16 | 50 | -(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 | + */ |
17 | 64 | +(id)effectWithContrast:(float)contrast;
|
18 | 65 |
|
19 | 66 | @end
|
0 commit comments