symbol-format.txt
=================
There is now 2 supported symbol formats.
ASVD - my origional format used for the SQL database to minimise data size and the newer xml format
the XML format is a local database stored as individual files on the underlying filesystem.



Features of a symbol
====================
can be specified in pingrid units or any real measurments
real measurments may cause confusion.  in reality a symbol only needs to conform to th3e pin grid.

a symbol can be defined in any units and have a statment stating how many of those units map to 1 pingrid unit.


a symbol must be a multiple of pingrid steps in size.
the symbol may be described in any units desired but must have a definition of how
many of the used units maps to 1 pingrid unit.


predefined line styles: boarder





XML Format
==========
<!DOCTYPE REDS-SYMBOL-v01>
<symbol name="AND" descr="2 Input Nand gate" pingrid="10mm" x="3" y="4">
	<line x1="0" y1="0" x2="10" y2="0"  />
	<line x1="10" y1="0" x2="10" y2="10"  />
	<line x1="10" y1="10" x2="0" y2="10"  />
	<line x1="0" y1="10" x2="0" y2="0"  />
	<designator x="0" y="-4" show="1" />
	<comment x="0" y="-3" show="1" />
	<aux x="0" y="-2" show="0" />
</symbol>

designator	- location of designator relative to symbol top left corner in pingrid units
comment		- location of comment relative to symbol top left corner in pingrid units
aux		- location of aux string  relative to symbol top left corner in pingrid units


ASVD Format
===========

PS xxx		- Pingrid to actual units mapping	PS,5mm
SZ,10mm,20mm	- size in real units (not pingrid)	-- NOTE: might be obsolete as i plan to change to pingrid steps.




This formayt is used for the postgreSQL database at present althought it
might be desirable to store xml data directly in the database at some later stage.
Symbols are simple monocrome vector diagrams used to represent components.
If multicolour or large bitmaps are needed see "logo-format.txt"

For conveniance if no units are given the numbers are assumed to be in mm
ASVD10 = ASCII Symbol Vector Definition Version 1.0

If a different pinspacing is used in the editor to that specified in the symbol
data the symbol is scaled before drawing.


Header
------
[ASVD10]
PG,5mm        Sets pinspacing to 5mm.  pin grid starts at top left of the component (0,0)
SZ,x,y
Line      L,x1,y1,x2,y2,thickness
Arc       A,cx,cy,radius,start_angle,end_angle,thickness
Rectangle R,x1,y1,x2,y2,thickness
Fill      F,x1,y1
Text      T,x1,y1"string",height
Bitmap    B,x1,y1,x2,y2,ascii-hex data


currently the # comments are not supported
Sample File:
[AVSD10]
PS,5mm                        # pin grid = 5mm
SZ,10mm,20mm                  # 10mmx20mm bounding rectangle
L,0mm,0mm,5mm,10mm,0.5mm
L,5mm,10mm,10mm,0mm,0.5mm
R,0mm,0mm,10mm,20mm,1mm
END










