Composition elements are graphics shapes and filter effects that can be applied to graphic and window documents. Composition elements include shapes like filled rectangle, framed rectangle, filled oval, framed oval, filled polygon, framed polygon, pixels and multicolored pixels plus others. There are also a range of filter effects like RGB balance, HSL balance, blur and sharpen plus others. There is also a simple text drawing composition element.

There are quite a number of examples using composition elements on the Drawing Shapes page.

Composition elements are probably the most complex part of iMagine Photo providing a huge amount of functionality for drawing shapes and applying filters. All the different composition element types are described on the Composition elements 2 page.

There are many composition elements properties that are common to many different composition element types, these properties are listed on this page.

background color

Specifies the background to draw with. A background color is specified by a list of 3 values {red, green, blue}. Each value has a range from 0 (none) to 65535 (fully saturated). In filled oval or filled poly drawing if background color is not specified then only the the area covered by the shape is drawn and the background is not drawn. The background is also not drawn when the drawing type is quartz.

Background color is a required property of:

and is an optional property of:

bounds rectangle

Specifies the bounding rectangle over which a filter effect will be applied or for shape drawing it specifies the bounding rectangle within which the shape will be drawn. A rectangle is specified by a list of 4 integers {left, top, right, bottom}.

Bounds rectangle is a required property of the following composition element class types:

Bounds rectangle is an optional property for the filter effect composition element types. The default bounds rectangle for the filter effect composition types is the total area of the graphic or window document.

The filter effect composition elements bounds rectangle is an optional property for are listed below:

class

Specifies the class type of the composition element to create. There is no default and it is a required property in every composition element properties record.

The list of possible composition element class types are:

color

Specifies the color to draw the shape with. A color is specified by a list of 3 integers {red, green, blue}. Each value has a range from 0 (none) to 65535 (fully saturated). Color is a required property of the following composition element class types:

drawing type

Specifies whether to use quartz or quickdraw to draw with.

Is an optional property for the following composition element classes:

graphics mode

Specifies which of the quickdraw graphics mode the drawing command is going to use, ignored when the drawing type is quartz. The default graphics mode is dither copy. The alpha based graphics modes are used only for drawing from a graphics importer. If the graphics mode is blend, sub pin, or add pin then opcolor should also be specified.

Is an optional property for the following composition element classes:

line thickness

Specifies the thickness when drawing any framed object or drawing a line.

Is only ever an optional property. Is an integer, a thickness of 1 is the default and thinnest possible line.

Is an optional property for the following composition elements:

opacity

Specifies the opacity to use for the quartz drawing type. An opacity of 0.0 means that the drawn object will be completely transparent, whereas an opacity of 1.0 will completely obscure any drawing underneath the newly drawn object. Opacity defaults to 1.0

Is an optional property for the following composition element classes:

opcolor

Specifies the opcolor value used for the quickdraw graphics modes, blend, add pin, and sub pin. Opcolor is defined in exactly the same way as color is defined. The meaning of the three values is used differently to how color uses them, though each component still refers to {red, green, blue}. The default opcolor is {32767, 32767, 32767}, which is probably only a sensible value for the blend graphics mode, so it is appropriate to specify the opcolor every time the graphics mode is set to one of the blend, add pin, or sub pin graphics modes.

Is an optional property for the following composition element classes:

start point

Specifies the point from which the line will start for line drawing. For drawing text, specifies the base point from which to start drawing the text. Ignores rotation. The start point is defined by a list of two integers, which specify the horizontal and vertical start points.

It is a required property of the following composition element classes: