Package: dia Version: 0.97.1-6When exporting to fig format, small linewidths from 2-10 (in XFig 1/80 inch units) can not be generated and all gets mapped to width 1.
This is handled in plug-ins/xfig/xfig-export.c by the following: ... if (renderer->linewidth <= 0.3175) width = 1; else width = (int)((renderer->linewidth / 2.54) * 80.0); ... Inserting the threshold-value in the scaling expression gives: 0.3175/2.54*80 = 10 Changing the threshold to 0.03175 makes it possible to generate fig-files with linewidths between 1 and 10. See attached patch. lines.dia shows some lines of different widths and lines.fig shows the result of exporting to fig after applying the patch to dia. -- Heine Larsen
--- dia-0.97.1.orig/plug-ins/xfig/xfig-export.c +++ dia-0.97.1/plug-ins/xfig/xfig-export.c @@ -295,7 +295,7 @@ figLineWidth(XfigRenderer *renderer) { int width = 0; /* Minimal line width in fig diagrams. */ - if (renderer->linewidth <= 0.3175) width = 1; + if (renderer->linewidth <= 0.03175) width = 1; else width = (int)((renderer->linewidth / 2.54) * 80.0); return width; }
lines.dia
Description: application/dia-diagram
lines.fig
Description: application/xfig