After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625616 - dia: fig export has wrong threshold for linewidth mapping
dia: fig export has wrong threshold for linewidth mapping
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: exports
0.97.x
Other All
: Normal normal
: 0.97.2
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-29 20:27 UTC by Roland Stigge
Modified: 2011-12-17 15:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The Patch (393 bytes, text/x-c)
2010-07-29 20:27 UTC, Roland Stigge
Details

Description Roland Stigge 2010-07-29 20:27:20 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.
Comment 2 Hans Breuer 2011-12-17 15:57:09 UTC
Cherry-picked to dia-0-97 branch.