A SERVICE OF

logo

118 Chapter 3
Syntax
rectangle(
X @ <pixel>,
Y @ <pixel>,
Xs @ <pixel>,
Ys @ <pixel>,
[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>]
[Angle @ <value -360..360>]
[Smooth @ <true, false>]
[Fill @ <true, false>]
);
Parameters
X - indicates (in pixels) the x axis coordinate of the upper left corner of the rectangle. This
parameter is required and has no default value.
Y - indicates (in pixels) the y axis coordinate of the upper left corner of the rectangle. This
parameter is required and has no default value.
Xs - indicates (in pixels) the x axis coordinate of the lower right corner of the rectangle,
relative to the upper left corner. This parameter is required and has no default value.
Ys - indicates (in pixels) the y axis coordinate of the lower right corner of the rectangle,
relative to the upper left corner. This parameter is required and has no default value.
Opacity - specifies opacity of the drawn object. The default value is 255 (completely
solid).
Unlock - if set to “true”, causes the rectangle to display only where the specified color
value appears in the current (background) image. The default is false.
Color - sets the color of the rectangle.
Index - colorizes the line using the available color palette from the source image (as an
alternative to the Color parameter).
NOTE: You cannot specify values for both the Color and Index parameters.
Saturation - specifies a value used for weighting for the change in saturation for
destination pixels. A value of 255 changes the saturation of pixels to the specified color. A
value of 128 changes the saturation of a pixel to a mid-value between the pixel’s current
color and the specified color.
NOTE: The Saturation parameter only functions when the Blend parameter is set to
“colorize.”