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