
114 Chapter 3
•
•
•
•
pixellateMosaic()
Pixellates the image, with pixel size determined by the Radius parameter.
NOTE: This function is “selection aware,” so that if a selection has been made, the system applies
it based on the current selection. For more information about making selections, see “selection()” on
page 129.
Syntax
pixellateMosaic(
[Size <2..64>]
);
Parameters
Size - determines the resulting pixel size. The default is 8.
Example
var image = new Media();
image.load(name @ "peppers.tga");
image.pixellateMosaic(Radius @ 10);
image.save(type @ "jpeg");
polygon()
Draws and positions a polygon on the image based on the specified parameters. This
method accepts all composite() parameters except HandleX and HandleY.
The foreground color may vary with this function, depending on the original Media object.
If the object has a set foreground color, or it is set with the setColor() function, MediaRich
uses the set color.
However, if the object has no set foreground color, MediaRich does the following:
•
For objects with 256 colors or less, MediaRich uses the last color index
•
For objects with 15-bit or greater resolution, MediaRich uses white
NOTE: Using polygon() to mask frames within a JavaScript for loop can result in initially
poor anti-aliasing. To maintain optimal anti-aliasing, place the masking polygon outside the loop.