Menu

#196 Small radius circles not rasterised

fig2dev
pending
nobody
None
2025-09-22
2025-09-12
No

I created a wiring diagram and then I scaled it down to include in a larger diagram

rasterisation in xfig (export to PPM, but all the exports fail) or in command line (fig2dev -L ppm foobar.fig) gives:
fig2dev -L ppm foobar.fig
Invalid ellipse object at line 111.

both fig2dev and xfig are version 3.2.9a

line 112 (by the way line number do not count the second comment line on top)
1 3 0 1 0 0 50 -1 20 0.000 0 -0.0000 495 1125 3 3 495 1125 490 1125
I changed the 0 to 1 in 7th argument (a previous bug, but corrected in 3.2.9a normally)
1 3 0 1 0 0 50 -1 20 0.000 1 -0.0000 495 1125 3 3 495 1125 490 1125
=> same error message

Increasing the radius to 5 (4 in not enough) allows rasterisation
1 3 0 1 0 0 50 -1 20 0.000 1 -0.0000 495 1125 5 5 495 1125 490 1125
=> export is OK

Discussion

  • tkl

    tkl - 2025-09-14
    • xfig / fig2dev: xfig --> fig2dev
     
  • tkl

    tkl - 2025-09-14

    The behaviour as reported was introduced with commit [c4465e] and affects the development version of fig2dev. In my tests with fig2dev 3.2.9a, all three circles described above rendered correctly. Commit [d8e1ce] now partially reverts the commit mentioned above.
    This issue reveals a faulty design decision made previously with commit [c4465e]. Luckily, it was discovered quickly. Originally, one of the output backends of fig2dev would have problems with too small circles. Initially it was thought that small circles could generally be rejected when reading a fig file: One, because xfig would not easily produce such circles, two because circles with radii smaller than half the line thickness would not make much sense. They are anyhow equivalent to a filled circle with zero line thickness and radius equal to half the line thickness. However, a user is obviously free to draw circles in any fashion, hence the logic above does not apply, and fixes have to be applied to the backend that can not deal with small circles.
    The line number counting is corrected with commit [4641f0].

     

    Related

    Commit: [4641f0]
    Commit: [c4465e]
    Commit: [d8e1ce]

  • Hubert M.J. Cantalloube

    thanks,

     
  • tkl

    tkl - 2025-09-22
    • status: open --> pending
     

Log in to post a comment.

MongoDB Logo MongoDB