< Scenes and regions Index Images >

Shapes

Shapes describe the geometric form of a region in a scene.

All shapes have two dimensions called x and y. They are located relative to the position of the region. The shape is alligned to the region by its leftmost and topmost point.

Circle

Item typeCircle
Descriptiona shape where all points of the border have the same distance from a center.
Action-
Condition-

KeyTypeDefaultDescription
centerpointthe center
radiusintthe radius

Ellipse

Item typeEllipse
Descriptiona shape where all points of the border have the same distance from two centers.
Action-
Condition-

KeyTypeDefaultDescription
center1pointfirst center
center2pointsecond center
radiusintradius

Note: The radius of an ellipse is defined here as the sum of the distances between a point of the border and both centers.

Rectangle

Item typeRectangle
Descriptiona shape with four sides that are parallel to the dimensions
Action-
Condition-

KeyTypeDefaultDescription
positionpoint(0,0)the upper left corner
sizepointwidth and height

Polygon

Item typePolygon
Description
Action-
Condition-

KeyTypeDefaultDescription
points[point]the end points of the lines

Note: Usually, polygons consist of at least three points. Single points and lines with two points are valid, but will be very difficult to find in a scene.

WindowsRegion

Item typeWindowsRegion
Descriptiona region in the Windows format
Action-
Condition-

KeyTypeDefaultDescription
region[byte]a region handle of Windows

Note: The bytes in the attribute region have to be retrieved by the Windows function DWORD GetRegionData(HRGN, DWORD, LPRGNDATA).

ColourMap

Item typeColourMap
Descriptiona shape defined by the colour in an image
Action-
Condition-

KeyTypeDefaultDescription
imageImagean image
colourcolourthe colour to define the region

With colour maps, a single image may be used to define several regions. Each region has the shape that is defined by one colour of the image. Unlike the geometrically defined shapes, this allows you to associate single pixels directly to a region. Thus, even complex and unusual shapes may be defined easily.

Combination

Item typeCombination
Descriptiona combination of several shapes
Action-
Condition-

KeyTypeDefaultDescription
combinebyte+the type of combination; see definitions for values
shapes[Shapes]a list of shapes to combine
offsets[point][]a list of offsets

The offsets change the relative position of the according shape. The list needs not to contain an offset for every shape (i.e. the list may be empty or shorter than the list of shapes).