Convolutionfilter Constructor - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

ConvolutionFilter constructor

public ConvolutionFilter(matrixX:Number, matrixY:Number, matrix:Array,
[divisor:Number], [bias:Number], [preserveAlpha:Boolean],
[clamp:Boolean], [color:Number], [alpha:Number])
Initializes a ConvolutionFilter instance with the specified parameters.
Availability: ActionScript 1.0; Flash Player 8
Parameters
- The x dimension of the matrix (the number of columns in the matrix).
matrixX:Number
The default value is 0.
- The y dimension of the matrix (the number of rows in the matrix). The
matrixY:Number
default value is 0.
- The array of values used for matrix transformation; returns a copy. The
matrix:Array
number of items in the array must equal
[optional] - The divisor used during matrix transformation. The default
divisor:Number
value is 1. A divisor that is the sum of all the matrix values evens out the overall color intensity
of the result. A value of 0 is ignored and the default is used instead.
[optional] - The bias to add to the result of the matrix transformation. The
bias:Number
default value is 0.
preserveAlpha:Boolean
to all channels, including the alpha channel. A value of
applies only to the color channels. The default value is
[optional] - For pixels that are off the source image, a value of
clamp:Boolean
that the input image is extended along each of its borders as necessary by duplicating the color
values at the given edge of the input image. A value of
should be used, as specified in the
[optional] - The hexadecimal color to substitute for pixels that are off the
color:Number
source image.
[optional] - The alpha of the substitute color.
alpha:Number
Example
The following code creates a 3 x 3 convolution filter with a divisor of 9. The filter would
make an image appear blurred:
var myArray:Array = [1, 1, 1, 1, 1, 1, 1, 1, 1];
var myFilter:ConvolutionFilter = new flash.filters.ConvolutionFilter (3,
3, myArray, 9);
matrixX*matrixY
[optional] - A value of
and
color
alpha
ConvolutionFilter (flash.filters.ConvolutionFilter)
.
indicates that the convolution applies
false
indicates that the convolution
true
.
true
indicates that another color
false
properties. The default is
indicates
true
.
true
465

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF