EaselJS

EaselJS  0.4.2

EaselJS > EaselJS > ColorFilter
Search:
 
Filters

Class ColorFilter

Applies color transforms.

Constructor

ColorFilter ( redMultiplier , greenMultiplier , blueMultiplier , alphaMultiplier , redOffset , greenOffset , blueOffset , alphaOffset )
Parameters:
redMultiplier <Number>
greenMultiplier <Number>
blueMultiplier <Number>
alphaMultiplier <Number>
redOffset <Number>
greenOffset <Number>
blueOffset <Number>
alphaOffset <Number>

Properties

alphaOffset - Number

Alpha channel offset (added to value).

blueMultiplier - Number

Blue channel multiplier.

blueOffset - Number

Blue channel offset (added to value).

greenMultiplier - Number

Green channel multiplier.

greenOffset - Number

Green channel offset (added to value).

redMultiplier - Number

Red channel multiplier.

redOffset - Number

Red channel offset (added to value).

Methods

applyFilter

void applyFilter ( ctx , x , y , width , height , targetCtx , targetX , targetY )
Applies the filter to the specified context.
Parameters:
ctx <object> The 2D context to use as the source.
x <object> The x position to use for the source rect.
y <object> The y position to use for the source rect.
width <object> The width to use for the source rect.
height <object> The height to use for the source rect.
targetCtx <object> Optional. The 2D context to draw the result to. Defaults to the context passed to ctx.
targetX <object> Optional. The x position to draw the result to. Defaults to the value passed to x.
targetY <object> Optional. The y position to draw the result to. Defaults to the value passed to y.
Returns: void

clone

ColorFilter clone ( )
Returns a clone of this ColorFilter instance.
Returns: ColorFilter
A clone of the current ColorFilter instance.

initialize

protected void initialize ( )
Initialization method.
Returns: void

toString

String toString ( )
Returns a string representation of this object.
Returns: String
a string representation of the instance.