The sources for xfig and TransFig can be found in /contrib/applications/drawing_tools.