
64
EXTENDING FIREWORKS
The Document object
Las
t
up
d
a
ted
12/8/2009
Description
Converts the selected item(s) to a new symbol.
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.convertAnimSymbolToGraphicSymbol()
dom.convolveSelection()
Availability
Fireworks MX 2004.
Usage
dom.convolveSelection(
kernelWidth, kernelHeight, kernelValues, affectsAlpha
)
Arguments
kernelWidth
An integer that defines the width of the filter coefficients.
kernelHeight
An integer that defines the height of the filter coefficients.
kernelValues
An array of integers that defines the values for specific filter patterns.
affectsAlpha
A Boolean value:
true
means the convolution filter affects the transparency of the bitmap;
false
means that the bitmap transparency isn’t affected by the filter.
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);
Содержание 65011817 - Fireworks CS4 - Mac
Страница 1: ...Extending ADOBE FIREWORKS CS4...