
MediaScript Objects and Methods 51
•
•
•
•
arc()
Draws and positions an arc 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 arc() to mask frames within a JavaScript for loop can result in initially poor anti-
aliasing. To maintain optimal anti-aliasing, place the masking arc outside the loop.
Syntax
arc(
X @ <pixel>,
Y @ <pixel>,
Rx @ <value>,
Ry @ <value>,
Startangle @ <value -360..360>,
Endangle @ <value -360..360>,
[Opacity @ <value 0..255>]
[Unlock @ <color in hexadecimal or rgb>]
[Color @ <color in hexadecimal or rgb>]
[Index @ <value 0..16777215>]
[Saturation @ <value 0..255>]
[PreserveAlpha @ <true, false>]
[Blend @ <"blend-type">]
[Width @ <value>]
[Smooth @ <true, false>]
[Fill @ <true, false>]
[Warpangles @ <true, false>]
);
Parameters
The arc is created as a portion of a defined ellipse:
X - specifies (in pixels) the x axis coordinate for the center point of the ellipse from which
the arc is derived. This parameter is required and has no default value.
Y - specifies (in pixels) the y axis coordinate for the center point of the ellipse from which
the arc is derived. This parameter is required and has no default value.
Rx - specifies (in pixels) the radius of the ellipse (from which the arc is derived) on the x
axis. This parameter is required and has no default value.