Activity for David Fletcher

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    I've now found the cause of the export problem and fixed it. There was an angle being handled incorrectly in the patched part of fig2dev. It was affecting arcs which have been both rotated and flipped vertically. A patch is included in the attached tar.gz 0001-Fix-for-ellitpic-arcs-that-have-been-flipped-and-rot.patch This is a patch for fig2dev and clears up the export rotation problem. 0001-Fix-glitch-for-elliptic-pie-arcs.-Remove-debugging-p.patch This is a patch for xfig. It clears up a drawing...

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    Thanks for the files. I can reproduce it, and after trying lots of drawings I've found it is caused by using the vertical flip function. After using this the arc you use it on comes out the wrong way up in the export (it affects SVG as well as EPS). If you use the vertical flip twice the arcs work properly again. My code in the vertical flip has an error! I suspect that the direction flag is being changed when it should not be, or fig2dev is using the direction flag wrongly for the elliptic arc....

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    Great that the patches applied cleanly. This upside down arc eps is strange. I created a similar looking fig file here (see in the attached tar.gz file) and exported to eps - it is working ok. Please can you attach the fig file and eps file this fault happens with and I'll try to understand what is causing this. I forgot to mention that there is a bug in the unpatched Xfig which is fixed in the elliptic arc patch. It occurs if a circular arc is chopped by a line. It should form two new arcs, but...

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    I've attached the patches which add elliptic arcs to Xfig and Fig2dev. These are against the current git versions. Also attached is a figure drawn to explain how I've implemented the elliptic arcs within the existing tools such as rotation, mirroring and flipping items of the drawing. Only one attachment was allowed so the patches and figure are tar.gz combined. As shown in the figure, the elliptic arc (blue) is defined by a centre and three points (0, 1, 2). These points lie on a circle surrounding...

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    I have resolved the storage format now - we can have everything stored within the original file format and good fall-back to reasonable behaviour if opening the files on a version of XFig without the elliptic arc capability. point[1] of a circular arc isn't actually used for much so we can repurpose it. There's two pieces of information that need to be stored: (i) the ratio of semi-axis lengths, and (ii) the angle of rotation of the ellipse. These can be stored in point[1].x and point[1].y. Using...

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    Things are going well with getting the elliptical arcs integrated. Several fig2dev conversions for export are now working (ps/eps/pdf, svg, Latex pict2e format). Tikz format is not viable as it does not have its own elliptic arc representation so without converting to some type of spline or using additional external packages it won't work. The main sticking point is the file format and making sure that this doesn't break anything. Here are some notes on things that don't work, followed lower down...

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    Screenshot attached illustrating the current status.

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    I think the file format change could be why this stalled previously. I'll take a look and see if the information can be squeezed in without adding the additional digit to the line. Currently the elliptic arc 'falls back' to being plotted as a circular arc if the file is read by software that doesn't understand elliptic arcs in the FIG format. That depends on the software reading the file without worrying about the extra digit stored. I guess by squeezing in the data to the same string format as a...

  • David Fletcher David Fletcher posted a comment on discussion General Discussion

    Back in 2001 I wrote a patch for xfig 3.2.3d to give Xfig the capability to draw elliptical arcs. I emailed it to Brian V. Smith and I think we might have exchanged a couple of emails. I've used my patched version since then but the elliptical arcs didn't appear in the release version. Recently I was looking at the Xfig sources and realised there's elements of my patch in there, and in docs/TODO elliptical arcs are listed as a future item for version 4. Elliptical arcs need a file format change to...

1