Syntax for the Simple Vector Format (SVF) v1.1

<identifier>		identifier is a symbol which is defined elsewhere
<identifier>		identifier which hasn't been fully implemented yet
Identifier		a constant
"string"		a literal string
[<identifier>]		<identifier> is optional
{<identifier>}		<identifier> may appear 0 or more times
<id1> + <id2>		<id1> followed directly by <id2>
<id1> | <id2>		either <id1> or <id2>


<SVF file>	= <intro> + <header> + <body>
<intro>		= "SVF v" + <version number> + NullTerminator
<version number> = {"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "."}
<header>	= {<header item>}
<body>		= {<command>}


<header item>	= <name> | <extents> | <layer table> | <color table> | <background> |
	<transparent> | <notify table> | <imagewidth> | <transform> | <flags>
<name>		= Name + <null terminated string>
<extents>	= Extents + <xmin> + <ymin> + <xmax> + <ymax>
<layer table>	= LayerTable + <number of entries> + {<state> + <null terminated string>}
<color table>	= ColorTable + <number of entries> + {<red> + <green> + <blue>}
<background>	= Background + <color>
<transparent>	= Transparent + <color>
<notify table>	= NotifyTable + <number of zoomin entries> + <number of zoomout entries> +
	{<name> + <imagewidth>} + {<name> + <imagewidth>}
<imagewidth>	= Width + <millimeters>
<transform>	= Transform + <scale> + <basex> + <basey>
<flags>		= Flags + <flag>


<command>	= <point> | <moveto> | <lineto> | <polyline> | <relmoveto> |
	<rellineto> | <relpolyline> | <rectangle> | <circle> | <arc> |
	<bezier> | <text> | <text height> | <setcolor> | <setlayer> | <penwidth> |
	<fillmode> | <data> | <set1dlinkinfo> | <set2dlinkinfo> | <invisible>
<point>		= Point + <x> + <y>
<moveto>	= MoveTo + <x> + <y>
<lineto>	= LineTo + <x> + <y>
<polyline>	= Polyline + <number of points> + {<x> + <y>}
<relmoveto>	= RelMoveTo + <xoffset> + <yoffset>
<rellineto>	= RelLineTo + <xoffset> + <yoffset>
<relpolyline>	= RelPolyline + <number of points> + {<xoffset> + <yoffset>}
<rectangle>	= Rectangle + <width> + <height>
<circle>	= Circle + <radius>
<arc>		= Arc + <radius> + <startangle> + <endangle>
<bezier>	= Bezier + <x> + <y> + <x> + <y> + <x> + <y>
<text>		= Text + <width> + <null terminated string>
<text height>	= TextHeight + <height>
<setcolor>	= SetColor + <color>
<setlayer>	= SetLayer + <layer>
<penwidth>	= SetPenWidth + <width>
<fillmode>	= FillMode + <fill>
<data>		= Data + <number of bytes> + {<byte>}
<set1dlinkinfo>	= 1dLink + <null terminated string> + <null terminated string> 
<set2dlinkinfo>	= 2dLink + <null terminated string> + <null terminated string>
<invisible>	= Invisible



<xmin/ymin/xmax/ymax> <x/y> <radius> <startangle> <endangle> <height> <width> <millimeters>
	if the corresponding command is a 1 byte command, these numbers range from 0 to 255
	if the corresponding command is a 2 byte command, these numbers range from 0 to 65535
<offset> <xoffset> <yoffset>
	if the corresponding command is a 1 byte command, these numbers range from -128 to 127
	if the corresponding command is a 2 byte command, these numbers range from -32768 to 32767
<scale> <basex> <basey>
	often these values correspond to the 8 byte version of the command,
	but may also be 1 or 2 byte commands
<number of bytes> <number of entries> <number of points>
	1 or 2 bytes depending on the command length
	note that the number of items following it depends on this value
<color> <layer>
	1 or 2 byte index into the appropriate table depending on command length.
	index starts with 0.
<red> <green> <blue>
	range from 0 to 255. 0 being black and 255 being pure red, green, or blue.
<state> <fill>
	0 if off,  1 if on.
<flag>
	0 default.  1 - entities within a layer can be rearranged while displaying for optimization.
<null terminated string>
	printable character values followed by NullTerminator
<byte>
	any value from 0 to 255


NullTerminator	= 0


Name		= 1
Extents		= 2
ColorTable	= 3
Background	= 4
LayerTable	= 5
Width		= 7
NotifyTable	= 8
Transparent	= 9
Transform	= 10
Flags		= 11

Point		= 16
MoveTo		= 17
LineTo		= 18
Polyline	= 19
RelMoveTo	= 20
RelLineTo	= 21
RelPolyline	= 22
Rectangle	= 23
Circle		= 24
Arc		= 25
Bezier		= 26
Text		= 27
TextHeight	= 28
SetColor	= 29
SetLayer	= 30
SetPenWidth	= 31
FillMode	= 32
Data		= 34
1dLink		= 35
2dLink		= 36
Invisible	= 37

Related pages...
*SVF Technical Information
*SVF Specification
*HTML Syntax for hyperlinks and embedding SVF images in HTML documents
scotts@softsource.com