GNOME Bugzilla – Bug 625616
dia: fig export has wrong threshold for linewidth mapping
Last modified: 2011-12-17 15:57:09 UTC
Created attachment 166796 [details] The Patch Hi, a Debian user reported the following: ====================================================================== When 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. ====================================================================== See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590857 and the attached patch from there.
Thanks, applied: http://git.gnome.org/browse/dia/commit/?id=2e40104c80f5fcf4f3c4e32dfbbacef12af72276
Cherry-picked to dia-0-97 branch.