Inherits from CCEffect : NSObject
Declared in CCEffectContrast.h

Overview

CCEffectContrast adjusts the contrast of the sprite or effect node it is attached to.

Tasks

Accessing Effect Attributes

Initializing a CCEffectContrast object

Creating a CCEffectContrast object

Properties

contrast

The contrast adjustment value that is used to scale the pixel colors of the affected node. This value is in the range [-1..1], and the napping of this value to the color scale factor is: pow(4.0, contrast). This means that an adjustment value of -1 scales the affected color by 0.25, 0 results in no change, and 1 scales the affected color by 4.

@property (nonatomic) float contrast

Declared In

CCEffectContrast.h

Class Methods

effectWithContrast:

Initializes a CCEffectContrast object with the supplied parameters.

+ (id)effectWithContrast:(float)contrast

Parameters

contrast

The desired contrast adjustment.

Return Value

The CCEffectContrast object.

Declared In

CCEffectContrast.h

Instance Methods

init

Initializes a CCEffectContrast object with a contrast adjustment of 0.

- (id)init

Return Value

The CCEffectContrast object.

Declared In

CCEffectContrast.h

initWithContrast:

Initializes a CCEffectContrast object with the supplied parameters.

- (id)initWithContrast:(float)contrast

Parameters

contrast

The desired contrast adjustment.

Return Value

The CCEffectContrast object.

Declared In

CCEffectContrast.h