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.
| Item type | Circle |
| Description | a shape where all points of the border have the same distance from a center. |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
| center | point | | the center |
| radius | int | | the radius |
| Item type | Ellipse |
| Description | a shape where all points of the border have the same distance from two centers. |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
| center1 | point | | first center |
| center2 | point | | second center |
| radius | int | | radius |
Note: The radius of an ellipse is defined here as the sum of the distances between a point of the border
and both centers.
| Item type | Rectangle |
| Description | a shape with four sides that are parallel to the dimensions |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
| position | point | (0,0) | the upper left corner |
| size | point | | width and height |
| Item type | Polygon |
| Description | |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
| 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.
| Item type | WindowsRegion |
| Description | a region in the Windows format |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
| 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 type | ColourMap |
| Description | a shape defined by the colour in an image |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
| image | Image | | an image |
| colour | colour | | the 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.
| Item type | Combination |
| Description | a combination of several shapes |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
| combine | byte | + | 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).