[Pkg-dia-team] Bug#590857: fig export has wrong threshold for linewidth mapping

Heine Larsen heine at skjulhoj.dk
Thu Jul 29 17:49:35 UTC 2010


Package: dia
Version: 0.97.1-6

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.

--
Heine Larsen

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dia-linewidth-threshold.diff
URL: <http://lists.alioth.debian.org/pipermail/pkg-dia-team/attachments/20100729/baebbb4c/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lines.dia
Type: application/x-dia-diagram
Size: 1484 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dia-team/attachments/20100729/baebbb4c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lines.fig
Type: application/x-xfig
Size: 1735 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dia-team/attachments/20100729/baebbb4c/attachment.fig>


More information about the Pkg-dia-team mailing list