Introduction

This document describes the element types used within the intermediate structure of the vector Migration on Request tool.

Graphical elements

Graphical elements describe the actual image. Without these, no image would be visible. Graphical elements may be simple and require no additional information or rendering code to be displayed - lines, rectangles and polygons. The co-ordinates used in their representations are enough to accurately describe the shapes. Others such as ellipses may require a little more `intelligence' to render. Another set of elements are more abstract since it is impossible to completely identify their appearance from the data contained in an input file. Text objects are a typical example -- information about the typeface, character spacing, and so on, may be unavailable, which could cause problems when the text has to be formatted, aligned or converted.

Rectangle

The rectangle element defines a rectangle which is axis-aligned.

Polygon

The polygon element defines a closed shape consisting of a set of connected straight line segments.

Polyline

The polyline element defines a set of connected straight line segments. Typically, 'polyline' elements define open shapes.

Path

Path elements represent a shape which can be filled, or outlined.

A path is described using the concept of a current point. In an analogy with drawing on paper, the current point can be thought of as the location of the pen. The position of the pen can be changed, and the outline of a shape (open or closed) can be traced by dragging the pen in either straight lines or curves.

The geometry of the shape is defined in terms of a list of PathElements. A PathElement is defined as a Move (set a new current point), Line (draw a straight line), Bezier (draw a curve using a cubic Bezier) or a ClosePath (close the current shape by drawing a line to the last Move). The first PathElement in the list, and the PathElement following a ClosePath, should be a Move.

Compound paths (i.e., a path with multiple subpaths) are possible to allow effects such as "donut holes" in objects.

Ellipse

The 'ellipse' element defines an ellipse which is axis-aligned with the current user coordinate system based on a center point and two radii.

Text

A text element consists of a single line of text, drawn parallel to the X axis. Text elements can have various styling attributes applied. Any font name that is specified is used verbatim in the output files. Text may not appear correctly in the output file if the named font is not present. Note that visually similar fonts exist under different names on different platforms - for example, Windows' Times New Roman is known as Trinity on RISC OS. Effects such as bold or italics transfer more effectively.

Structural elements

Some elements exist purely to provide structuring to the data. There should be no alteration to the visual appearance of the image if these structural elements are removed, provided that any contained objects or inherited attributes are correctly maintained. Currently only one type of structuring element exists -- the group.

Group

Individual elements can be grouped together. This allows the contained elements to be manipulated simultaneously - whether by the user in the rendering application or the application itself. Groups can be nested to create a hierarchy of elements. Elements within a group are plotted consecutively.


Back to developer's page