EaselJS

EaselJS  0.5.0

EaselJS > EaselJS > AlphaMapFilter
Search:
 
Filters

Class AlphaMapFilter

Applies a greyscale alpha map image (or canvas) to the target, such that the alpha channel of the result will be copied from the red channel of the map, and the RGB channels will be copied from the target.

Generally, it is recommended that you use AlphaMaskFilter, because it has much better performance.

Constructor

AlphaMapFilter ( alphaMap )
Parameters:
alphaMap <Image> The greyscale image (or canvas) to use as the alpha value for the result. This should be exactly the same dimensions as the target.

Properties

alphaMap - Image

The greyscale image (or canvas) to use as the alpha value for the result. This should be exactly the same dimensions as the target.

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

void clone ( )
Returns a clone of this object.
Returns: void

toString

void toString ( )
Returns a string representation of this object.
Returns: void