|
8 | 8 |
|
9 | 9 | #import "CCEffect.h"
|
10 | 10 |
|
| 11 | +/** |
| 12 | + * CCEffectSaturation adjusts the saturation of the sprite or effect node it is attached to. |
| 13 | + * |
| 14 | + */ |
| 15 | + |
11 | 16 | @interface CCEffectSaturation : CCEffect
|
12 | 17 |
|
| 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 | + */ |
13 | 26 | @property (nonatomic) float saturation;
|
14 | 27 |
|
| 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 | + */ |
15 | 38 | -(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 | + */ |
16 | 47 | -(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 | + */ |
17 | 61 | +(id)effectWithSaturation:(float)saturation;
|
18 | 62 |
|
19 | 63 | @end
|
|
0 commit comments