Rotating Vector File Format
The file format of a Rotating Vector Object is very simple, its a file header containg a magic key and the number of elements and colour information, followed one or more structures, the number of structures is indicated by number of elements in the header. The structure is limited to 65355 objects with less that 255 points in each structure. For its purpose as a simple animator on web pages this structure is more than complicated enough.
File Header
Byte Offset | Type | Description |
0 | int32 | Magic Key - always 0xfade0ff |
4 | int16 | Number of Elelements |
6 | int8 | The red element of the applet |
7 | int8 | The green element of the applet |
7 | int8 | The blue element of the applet. |
8 | int8 | padding - reserved set to 0 |
Poly Info Structures
Byte Offset | Type | Description |
0 | int8 | Type of structure 1=polygon 2=polyline |
1 | int8 | Number of items in structure |
2 | int8 | The red element - background |
3 | int8 | The green element - background |
4 | int8 | The blue element - background |
5 | int8 | The red element - foreground |
6 | int8 | The green element - foreground |
7 | int8 | The blue element foreground |
8 | struct PolyPoint[] | Structure of points 16 bytes each. one for each item in structure. |
struct PolyPoint
{
double angle;
double length;
};