Composition Elements 2
Shape drawing and filter class definitions.
class: filled rectangle - draws a filled rectangle.
Required properties
- bounds rectangle - specifies the rectangle bounds that will be drawn.{left, top, right, bottom }
- color specifies the color to be drawn. {red, green, blue}, each color component ranges from 0 to 65535
Optional properties
- drawing type - specifies whether to use quickdraw or quartz to draw with. Quickdraw is the default.
- graphics mode - specifies the graphics mode to use if the drawing type is quickdraw.
- opcolor - specifies the opcolor to use if the drawing type is quickdraw and the
- graphics mode is blend, add pin, or sub pin.
- opacity - specifies the opacity to use if the drawing type is quartz
class: framed rectangle - draws a framed rectangle.
Required properties
- bounds rectangle - specifies the rectangle to be drawn.
- color specifies the color to be drawn.
Optional properties
- drawing type - specifies whether to use quickdraw or quartz to draw with. Quickdraw is the default.
- opacity - specifies the opacity to use if the drawing type is quartz.
- line thickness - specifies the thickness of the framed line drawing.
class: filled oval - draws a filled oval.
Required properties
- bounds rectangle - specifies the rectangle that contains the oval.
- color specifies the color to be drawn.
Optional properties
- drawing type - specifies whether to use quickdraw or quartz to draw with. Quickdraw is the default.
- graphics mode - specifies the graphics mode to use if the drawing type is quickdraw.
- opcolor - specifies the opcolor to use if the drawing type is quickdraw and the graphics mode is blend, add pin, or sub pin.
- opacity - specifies the opacity to use if the drawing type is quartz.
- background color - specifies the the color that will be drawn outside the oval but inside the bounds rectangle. If not specified only the area inside the oval is drawn.
class: framed oval - draws a framed oval.
Required properties
- bounds rectangle - specifies the rectangle that contains the oval.
- color - specifies the color to be drawn.
Optional properties
- drawing type - specifies whether to use quickdraw or quartz to draw with. Quickdraw is the default.
- opacity - specifies the opacity to use if the drawing type is quartz.
- line thickness - specifies the thickness of the framed line drawing.
class: filled arc - draws a filled arc.
Required properties
- bounds rectangle - specifies the rectangle that contains the oval from which the arc is drawn.
- color - specifies the color to be drawn.
Optional properties
- graphics mode - specifies the graphics mode to use.
- opcolor - specifies the opcolor to use if the graphics mode is blend, add pin, or sub pin.
class: framed arc - draws a framed arc.
Required properties
- bounds rectangle - specifies the rectangle that contains the oval from which the arc is drawn.
- color - specifies the color to be drawn.
Optional properties
- line thickness - specifies the thickness of the framed line drawing.
class: filled poly - draws a filled polygon.
Required properties
- color - specifies the color to be drawn.
- poly points - Specifies the endpoints of the lines which define the polygon. The poly points are a list of pairs of integers. For example:
set polyPoints to {{20, 30}, {200, 100}, {200, 200}, {40, 200}}
Optional properties
- drawing type - specifies whether to use quickdraw or quartz to draw with. Quickdraw is the default.
- graphics mode - specifies the graphics mode to use if the drawing type is quickdraw.
- opcolor - specifies the opcolor to use if the drawing type is quickdraw and the graphics mode is blend, add pin, or sub pin.
- opacity - specifies the opacity to use if the drawing type is quartz.
class: framed poly - draws a framed polygon.
Required properties
- color - specifies the color to be drawn.
- poly points - Specifies the endpoints of the lines which define the polygon. The poly points are a list of pairs of integers. For example:
set polyPoints to {{20,30},{200,100}, {200,200}, 40,200}}
Optional properties
- drawing type - specifies whether to use quickdraw or quartz to draw with. Quickdraw is the default.
- opacity - specifies the opacity to use if the drawing type is quartz.
- line thickness - specifies the thickness of the framed line drawing.
class: standard line - draws a line.
Required properties
- color - specifies the color to be drawn.
- start point - Specifies the starting point of the line to be drawn.
- end point - Specifies the end point of the line to be drawn. The end point is defined by a pair of integers.
Optional properties
- drawing type - specifies whether to use quickdraw or quartz to draw with. Quickdraw is the default.
- opacity - specifies the opacity to use if the drawing type is quartz.
- line thickness - specifies the thickness of the framed line drawing.
class: pixels - draws pixels.
Required properties
- color - specifies the color to be drawn.
- pixel points - A list of points {horiz, vert} specifying the location of the pixels to draw.
Optional properties
class: multicolored pixels - draws pixels.
Required properties
- pixel points - A list of points {horiz, vert} specifying the locaation of the pixels to draw.
- pixel colors - A list of colors {red, green, blue}, specifying the color of the pixels to draw. For every pixel point there is a pixel color.
Optional properties
class: quartz drawing class - draws a shape which is built up from a list of records, which define lines and quadartic and cubic bezier curves.
Required properties
- color - specifies the color to be drawn.
- start point - Specifies the starting point of the quartz drawing.
- quartzRecord - A list of records containing quartzType, and end point. Depending on quartzType the record could also require cp1, and cp2.
- quartzType - The type of quartz drawing. quartz line/quartz cubic bezier/quartz quadratic bezier.
Optional properties
- cp1 - required for quartz cubic bezier and quartz quadratic bezier.
- cp2 - required for quartz cubic bezier.
class: standard text - draws text.
Required properties
- start point - Specifies the starting point of the text to be drawn. The starting point is the left side baseline of the text.
- drawing text - The text to be drawn.
- font - The font to be used. The font is specified by the font name.
- font size - The font size in points.
Optional properties
- font style - The font style. Default is plain text, other values are: bold, italic, bold plus italic, underline, bold plus underline, italic plus underline, italic plus bold plus underline
- color - specifies the color of the text to be drawn. Default is black {0, 0, 0}.
- background color - specifies the background color to be drawn. Default gives the greatest contrast for the color.
- graphics mode - specifies the graphics mode to use. The default changes depending on the settings for color and background color.
- opcolor - specifies the opcolor to use if the graphics mode is blend, add pin, or sub pin.
- rotation - specifies the rotation in degrees. As an integer.
- start from - specifies the reference point from which the text will draw. text baseline, top left, top right, bottom left, bottom right, centre. Default is text baseline, which was the previous behaviour.
class: blur - creates a blur filter composition element.
Required properties
- blur amount - Specifies the amount of blurring. The possible amounts are: least, a little, less than average, average, more than average, a lot, most
Optional properties
- bounds rectangle - specifies the bounds that the blur filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
class: RGB balance - creates a rgb balance filter composition element.
Required properties
- One of the color factor properties is required, otherwise nothing will happen.
Optional properties
- bounds rectangle - specifies the bounds that the rgb balance filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
- red factor - specifies the amount to change the red color component of the image by. It is an integer value and is in percentage terms. 0 (minimum) removes all the red from the image. 100 (default) leaves the red component unchanged. 200 (maximum) doubles the red contribution up to full saturation.
- green factor - specifies the amount to change the green color component of the image by. It is an integer value and is in percentage terms. 0 (minimum) removes all the green from the image. 100 (default) leaves the green component unchanged. 200 (maximum) doubles the green contribution up to full saturation.
- blue factor - specifies the amount to change the blue color component of the image by. It is an integer value and is in percentage terms. 0 (minimum) removes all the blue from the image. 100 (default) leaves the blue component unchanged. 200 (maximum) doubles the blue contribution up to full saturation.
class: color style - creates a color style filter composition element.
Required properties
- One of the solarize optional properties is required, otherwise nothing will happen.
Optional properties
- bounds rectangle - specifies the bounds that the solarize filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20, 30}, {200, 100}, {200, 200}, {40, 200}}
- solarize amount - specifies the amount to solarize the image by. It is an integer value. 0 (minimum) (default) does nothing. 8 (maximum), maximum solarization.
- solarize point - specifies the level around which to solarize. It is an integer value. 0 (minimum) 128 (default). 255 (maximum).
- posterize amount - specifies the amount to posterize the image by. It is an integer value. 0 (minimum) (default) 32 (maximum).
class: brightness and contrast - creates a brightness and contrast filter composition element.
Required properties
- One of brightness or contrast properties is required.
Optional properties
- bounds rectangle - specifies the bounds that the brightness and contrast filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
- brightness - specifies the amount to change the brightness of the image by. It is an integer value and is in percentage terms. -100 (minimum) makes the image black. 0 (default) leaves the brightness unchanged. 100 (default) doubles the brightness of the image.
- contrast - specifies the amount to modify the contrast of the image by. It is an integer value and is in percentage terms. -100 (minimum) removes all contrast from the image. 0 (default) leaves the contrast unchanged. 100 (maximum) doubles the contrast of the image.
class: detect edges - creates an edge detection filter composition element.
Required properties
Optional properties
- bounds rectangle - specifies the bounds that the detect edges filter will apply to. Default is the dimensions of the graphic or window document. {left, top, right, bottom}
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30}, {200, 100}, {200,200}, {40, 200}}
- width of edge - specifies the minimum width of the edge for it to be detected. It is specified by one of the following: least, a little, less than average, average, more than average, a lot, most
- colorize - specifies whether to colorize the image or not. It is an integer value: 0 is no (default), 1 is yes
class: emboss - creates an emboss filter composition element.
Required properties
Optional properties
- bounds rectangle - specifies the bounds that the emboss filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
- amount to emboss - specifies the level of embossing, which will be one of: least, a little, less than average, average, more than average, a lot, most
class: sharpen - creates a sharpen filter composition element.
Required properties
Optional properties
- bounds rectangle - specifies the bounds that the sharpen filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
- amount to sharpen - specifies the level of embossing, which will be one of: least, a little, less than average, average, more than average, a lot, most
class: HSL balance - creates a HSL balance filter composition element.
Required properties
- One of the factor properties is required, otherwise nothing will happen.
Optional properties
- bounds rectangle - specifies the bounds that the HSL balance filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - Specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
- hue factor - specifies the amount to change the color hue of the image by. It is an integer value and ranges from -60 to 60. 0 (default) leaves the color hue unchanged.
- saturation factor - specifies the amount to modify the saturation of the image by. It is an integer value and is in percentage terms. 0 (minimum) converts the image to black and white. 100 (default) leaves the saturation unchanged. 200 (maximum) maximum color saturation.
- lightness factor - specifies the amount to change the brightness of the image by. It is an integer value and is in percentage terms. 0 (minimum) converts the image to black. 100 (default) leaves the lightness unchanged. 200 (maximum) brightens the image up to a factor of 2 times.
class: centre gradient - creates a centre gradient filter composition element. This filter lightens or darkens the edges of the bounds rectangle.
Required properties
- One of vertical or horizontal brightening needs to be specified and non zero, otherwise nothing will happen.
Optional properties
- bounds rectangle - specifies the bounds that the centre gradient filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - Specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
- vertical brightening - specifies the amount of brightening at the top and bottom of the bounds rectangle. It is an integer value and is in percentage terms. -100 (minimum) makes the top and bottom of the bounds rectangle black. 0 (default) does not modify the brightness. 100 (maximum) doubles the brightness to saturation at the top and bottom.
- vertical distance - specifies the vertical distance from the centre of the bounds rectangle where brightening starts. Brightening increases linearly from this point to the edge of the bounds rectangle. It is an integer value and is in percentage terms. 0 (minimum) brightening starts from the centre. 50 (default) brightening starts from halfway to the edge. 99 (maximum) brightening starts close to the bounds edge.
- horizontal brightening - specifies the amount of brightening at the left and right of the bounds rectangle. It is an integer value and is in percentage terms. -100 (minimum) makes the left and right of the bounds rectangle black. 0 (default) does not modify the brightness. 100 (maximum) doubles the brightness to saturation at the left and right.
- horizontal distance - specifies the horizontal distance from the centre of the bounds rectangle where brightening starts. Brightening increases linearly from this point to the edge of the bounds rectangle. It is an integer value and is in percentage terms. 0 (minimum) brightening starts from the centre. 50 (default) brightening starts from halfway to the edge. 99 (maximum) brightening starts close to the bounds edge.
class: color sync - creates a color sync filter composition element.
Required properties
- source profile name - specifies the file name of the source color profile in the Library/Colorsync folder.
- destination profile name - specifies the file name of the destination color profile in the Library/Colorsync folder.
- matching option - specifies the type of matching option. The possible matching options are: perceptual (photos), relative colorimetric (logos), saturation (graphics), absolute colorimetric (logos)
Optional properties
- bounds rectangle - specifies the bounds that the color sync filter will apply to. Default is the dimensions of the graphic or window document. {left, top, right, bottom}
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
class: color tint - creates a color tint filter composition element.
Required properties
- tint type - specifies the tint type. The possible tint types are: black and white, x ray, sepia, cobalt, other - at lease one of the properties brightness, contrast, color, and background color will also required.
Optional properties
- bounds rectangle - specifies the bounds that the color tint filter will apply to. Default is the dimensions of the graphic or window document.
- filter clipping points - specifies the endpoints of the lines which define the polygon. The filter clipping points are a list of pairs of integers. For example:
set flClPoints to {{20,30},{200, 100},{200,200},{40,200}}
- tint amount - specifies the amount of tint to apply. It is an real value and ranges from 0.0 to 100.0. Default is 100.0.
- color - specifies the color that the bright parts of the image will be mapped to. An optional property for the other tint type. The brightness at each point is mapped using a linear interpolation between the background color and color. Default is white.
- background color - specifies the color that the dark parts of the image will be mapped to. An optional property for the other tint type. The brightness at each point is mapped using a linear interpolation between the background color and color. Default is white.
- brightness - specifies the amount that the image will be brightened by prior to applying the tint mapping. An optional property for the other tint type. It is an integer value and its range is from -100 to 100. Default is 0.
- contrast - specifies the change in contrast that will be applied prior to the tint mapping. An optional property for the other tint type. It is an integer value and its range is from -100 to 100. Default is 0.
class: bilinear interpolate - creates a bilinear interpolation composition element. Replaces the contents of a rectangle with a bilinear interpolation of the data defined by the frame of the bounds rectangles.
Required properties
- bounds rectangles - A list of bounding rectangles. Each rectangle specifies the area where bilinear interpolation will occur. The border or frame of the rectangle contains the data that the bilinear interpolation class will use to calculate the pixel values for the content region of the rectangle.