User Tools

Site Tools


The FIG file format

The FIG file format was introduced by Xfig and is used by WinFIG too. It is a text based, human-readable file format. The # is used to mark comment lines, but also for some content lines and for the figure comment and object comments.


The structure of a FIG file is fairly simple and contains a sequence of the following blocks (curly braces indicate a variable number of occurences).

{User colors}

Objects can be hierarchically nested using compound structures. A compound is itself an object and can be contained in other compounds.

Compound start
Compound end

A minimal FIG file

This is the contents of a minimal file with only one line made of 2 points:

#FIG 3.2
# Created by WinFIG version 4.5
Flush left
1200 2
0 32 #c85121
2 1 0 1 32 0 50 0 -1 4.000 0 0 0 0 0 2
	 963 1388 1988 688

The building blocks explained

fileformat.txt · Last modified: 2012/09/27 23:53 (external edit)