Example
The following command creates a graphic symbol from the selected item and names it "star":
fw.getDocumentDOM().convertToSymbol("graphic", "star");
See also
dom.convertToAnimSymbol(),
dom.convolveSelection()
Availability
Fireworks MX 2004.
Usage
dom.convolveSelection( kernelWidth, kernelHeight, kernelValues,
affectsAlpha)
Arguments
An integer that defines the width of the filter coefficients.
kernelWidth
An integer that defines the height of the filter coefficients.
kernelHeight
An array of integers that defines the values for specific filter patterns.
kernelValues
A Boolean value:
affectsAlpha
of the bitmap;
false
Returns
Nothing
Description
Applies convolution, or irregular, filters to the selected bitmap based on the pattern defined by
the argument values.
Example
The following example applies an edge-detection filter to the bitmap:
// width of convolution kernel
var w = 3;
// height of convolution kernel
var h = 3;
// Edge detection kernel
var k = new Array(0, 1, 0, 1, -4, 1, 0, 1, 0);
fw.getDocumentDOM().convolveSelection(w, h, k, false);
170
Fireworks JavaScript API
dom.convertAnimSymbolToGraphicSymbol()
means the convolution filter affects the transparency
true
means that the bitmap transparency isn't affected by the filter.
Need help?
Do you have a question about the FIREWORKS 8-EXTENDING FIREWORKS and is the answer not in the manual?