WinFIG is based on my earlier Amiga program called AmiFIG. The intention is not just to copy or clone Xfig. The file format and rendering will be as close to Xfig as possible, but the program will take advantage of Windows features like clipboard, printer preview, multiple documents etc. I tried to improve the user interface, so experienced Xfig users probably realize that the look&feel is not identical and some things work differently. The handling was changed to support a 2-button mouse. ...and btw I think that is much more usable.
Just like XFig, WinFIG has become quite popular among academic users for it's ability to use LaTeX syntax for texts as well as exporting to PSTricks, embedding PostScript or PDF into LaTeX or producing pure LaTeX output. So there is quite a range of options to fit WinFIG into a LaTeX environment, but of course it's not limited to that.
I did not yet include all the features I have in mind, but it can already be quite useful. So, enjoy and have fun.
Features include:| News |
4 March 2010 - Version 4.4
This is a quick bug fix release. Even though it follows two days after the previous release, I think the issues solved are important enough to release this followup immediately.Bug fixes:
- Compound objects could only be moved by grabbing them on the edges, but not by grabbing them on the corners. Quite an annoying bug that was there since version 4.0 final.
- A refresh problem was removed that occured when a compound had smart links to objects outside the compound.
2 March 2010 - Version 4.3
Changes:
- I didn't really like that when opening a compound object everything around it disappears. I made this behaviour configurable ("Preferences->Other") and added options to show the figure outside the compound either dimmed, gray, hidden or normal.
- Usually WinFIG writes the log file "winfig.log" to the program directory. This may not always be possible, i.e. under Windows 7 WinFIG does not have write privilege for its own folder. In that case the log file is now written to the user's temp directory, which is normally c:\Users\xxx\AppData\Local\Temp where xxx is the user name. Check the log file if you have problems showing LaTeX text, reading graphics etc.
7 February 2010 - Version 4.2
Changes:
- The "update attributes" function now shows a list of check boxes to select the attributes, which shall be updated to the current values.
Bug fixes:
- The path that constitutes an arc was limited to 1000 points resulting in incomplete arc objects when they are big.
- A possible crash when creating picture objects from unrecognized file formats.
- Selecting more than one object and the shift-unselecting one of them made them all "stick" to the mouse cursor.
24 December 2009 - Version 4.1
This release contains some features requested by users. Finally I had time to take care of some of them and I really think they increase the usability in some areas. Thanks alot for the suggestions.Changes:
- Figure export can be repeated using the same settings as before without going through the process of opening the expor dialog, setting export properties, saving changes etc. The "Export Again" is called from the "File" menu or via Ctrl-E hotkey.
- An additional option for the pdftex and pstex export was added. The background is that the pdftex and pstex exports write a LaTeX file that is not a complete LaTeX file that can be processed by pdflatex/latex. Instead, this is usually later embedded into a bigger LaTeX document using the \input directive. But sometimes it may be desirable or comfortable to just create a simple document without being required to manually create a LaTeX wrapper document and calling pdflatex or latex command etc. To achieve that I added one more option to the pdftex and pstex exports: "Export both parts and create a PDF document via pdftex"
If you choose that option WinFIG will write a dummy LaTeX document that contains the required LaTeX declarations for a minimal, translatable document as well as the \input statement and will also call pdflatex/latex on it. The result will be the PDF document containing all the graphical elements of the drawing as well as the LaTeX formatted texts. You can edit the dummy document by clicking on "Edit TeX envelope". This allows you to add any customized LaTeX code you want there. WinFIG takes care of page size and orientation by replacing the tokens PAPERSIZETOKEN and PAGEORIENTATIONTOKEN with the correct values.
Additionally you can check the "open in PDF/PS viewer" box to open the document immediately in a PDF/PS viewer. The PDF/PS viewer command can be configued in the "Other" tab of the "Preferences" dialog.
As a summary: WinFIG can now execute the following tool chains:
fig2dev (graphics)->fig2dev (texts)->pdflatex->PDF viewer
fig2dev (graphics)->fig2dev (texts)->latex->dvips->PS viewer
Perhaps this new function is a little bit too well hidden, but I put it there, because logically it belongs to the pdftex and pstex exports.- I added the LaTeX fonts to the Fonts dialog in order to allow LaTeX users to use them in their drawings.
Bug fixes:
- The internal steppings for the magnetic grid were calculated on startup, but not updated when changing the grid unit from metric to inches or vice versa later. Therefore the magnet did not work properly when changing the unit without restarting the program.
29 November 2009 - Version 4.02
This release only contains modifications in the export module (fig2dev). I applied the changes that were made in fig2dev Version 3.2 Patchlevel 5a (June 2009), so it's up to date with the original Unix version. WinFIG itself is unchanged.
26 November 2009 - Version 4.01
Changes:
- I was not satisfied with the way the snap-to-grid was working when moving objects while the magnet is activated. It was snapping the point where the object was hit by the mouse, but that usually makes it difficult to align the object in a way that it's boundaries match the grid in horizontal and vertical direction.
So I changed this. Now when you click on an object WinFIG determines if this click is close to the left and upper, left and lower, right and upper or right and lower boundary of the object and aligns these two sides of the object to the grid. That makes it very easy to i.e. align the left and upper side of a rectangle to the grid by grabbing it close to the upper left corner or align the right and lower side of a rectangle to the grid by grabbing it close to the lower right corner. It's very intuitive and much better than what is was before.Bug fixes:
- The antialiasing setting was not saved in the preferences.
- An issue regarding the calculation of text boundaries was solved. It caused wrong results with the align function when the zoom was higher than 100%.
- LaTeX formatted texts are inspected for characters with descent (g, j, p, q, y, Q). This is used when calculating the vertical alignment of the preview texts when "Render 'special' texts using LaTeX" is activated. It's still a workaround, but should work in most cases.
- The PostScript export (via fig2dev) was applying some modification to the line width. The result was that line widths were sligthly different in the PS file from what they a in WinFIG. I think it was a very old workaround for something Xfig related. I removed that piece of code.
- I made a small correction to the way WinFIG deals with line widths. The FIG files hold the line width in display resolution (i.e. 10), and that refers to a fixed display resolution of 80 dpi. This is traditional Xfig behaviour, but WinFIG uses the real display resolution for rendering and thereby allows a 1:1 scale. That means an inch or cm on the screen is really an inch or cm.
But many displays nowadays use a 96 dpi resolution and in that case there needs to be some adjustment for the difference between the reference 80 dpi and the 96 (or whatever) display dpi. Otherweise the lines are slightly too thin, because a 10 pixel width line is thinner on 96 dpi than on 80 dpi. In most cases the difference is negligible, but can be annoying when figures need to be very precise.
7 November 2009 - Version 4.0 final
I did not receive any reports about serious bugs, so I think the v4.0 has matured enough to advance from beta state to final.Changes:
- Use the scroll wheel while holding the Control key to zoom in/out in 10% steps.
- Some minor optimizations to reduce the number of required screen refreshes.
Bug fixes:
- It was possible to scroll the canvas down using the scroll wheel when no scrollbar was shown. But scrolling should only be possible withing the ranges that are defined by the scrollbars, which get their values from the page size.
29 October 2009 - Version 4.0 beta 3
This is a beta version! Use it only for non-sensitive data or make frequent backups. Right now I don't know any serious bugs, but there may still be some. Any bugs reported will be quickly fixed and new betas released.
Changes:
- I added a drop down box for some zoom presets. This is and alternative to pressing "+" or "-" multile times. There is also a "zoom to fit", which zooms in or out so that the drawing fits into the window.
- I added the Qt plugin libraries for image loading to the setup.
24 October 2009 - Version 4.0 beta 2
This is a beta version! Use it only for non-sensitive data or make frequent backups. Right now I don't know any serious bugs, but there may still be some. Any bugs reported will be quickly fixed and new betas released.
Changes:
- Good news for all Linux users. This is the first release that is also available for the Linux platform. If someone sponsors me a Mac I will also provide a Mac version.
Bug fixes:
- EMF export via fig2dev is now working.
- LaTeX formatted text were not correctly placed. The font descent was not factored in when calculating the y-coordinate.
- Some more minor bug fixes.
27 September 2009 - Version 4.0 beta 1
This is a beta version! Use it only for non-sensitive data or make frequent backups. Right now I don't know any serious bugs, but there may still be some. Any bugs reported will be quickly fixed and new betas released.
This release is a major redesign. I switched from Microsoft Foundation Classes to Nokias (former Trolltechs) Qt framework. It was a major effort to move everything to Qt, but I think it was the right step going forward and the future development will benefit from that. I already outlined the reasons in my blog:
- It has the much nicer programming model
- MFC seems almost abandoned by MS. There doesn’t seem to be much commitment to continue and really develop MFC now that .NET and C# are Microsofts favorite horses.
- MFC user interface programming is a pain
- Qt is platform independent
- Qt supports anti-aliasing for nicer graphical rendering
- Qt provides a more comprehensive widget set and it’s easier to create custom widgets.
- I also hope to get some graphics performance gains possibly trough using the OpenGL paint device as an configuration option (not yet implemented).
- It is very likely I will be able to provide a Linux version.
Changes:
- Using Qt as the application framework.
- The user interface is more modern (themes, resizable dialogs where useful).
- Render with anti-aliasing for smooth lines and shapes. This is slightly slower and can be switched off in the Preferences dialog.
- EMF export is not available right now, because this is not available within Qt. I will try to find a solution for this. Right now users who really need EMF output can only use the old WinFIG.
- Redesign of the Export dialog. The export formats are now selectable from a list.
- Some changes of the interface logic, i.e. the buttons for the constraint modes (free, LaTeX, Manhattan etc.) have been merged into a drop-down button in the tool bar.
- WinFIG now comes with a setup program. It is possible to keep old installations by just renaming their folder, i.e. name your old WinFIG C:\Program Files\WinFIG3. That will allow you to switch back to the old WinFIG in case you prefer that one.
- WinFIG 4 uses a different keyfile encoding. All registered user are entitled to receive a free keyfile for WinFIG 4. Just write me a mail and I will send you the updated keyfile.
22 September 2009 - Version 3.04
Bug fixes:
- Possible crash when hitting a tool button while no document is open.
- The copy-rotate function was delivering odd results.
- Some more minor bugs.
13 August 2009 - Version 3.03
Changes:
- LaTeX preview of text objects with LaTeX syntax is a little bit faster (about 25%).
Bug fixes:
- The Y margin size switch in the PSTricks export options was using -x instead of -y.
- WinFIG could crash when opening the font selection window, then changing the drawing tool, then selecting a font in the window.
- Working with custom arrow parameters for thickness, width and height was delivering odd results.
21 June 2009 - Version 3.02
This is just a small bug fix release.Bug fixes:
- Unter certain circumstances it was possible to connect a point of a closed polygon or spline to another object. This should only be possible with end points of open paths.
- fig2dev crashed when exporting a figure that contains 256-color images like GIFs or PNGs.
- It was possible to delete custom colors, even if they were being used in the figure.
- Opening the user color dialog could crash the application.
- Some other minor bug fixes.
22 February 2009 - WinFIG Wiki
I added a Wiki to this site. This will be the central place for all kind of documentation in the future. There is not much there right now, but I hope I will find the time to add content.
22 February 2009 - Version 3.01
Bug fixes:
- Arcs could not be selected when the figure was shifted using the scrollbars.
- Horizontal and vertical centering delivered wrong results when objects had been selected via shift-select. Note that the last selected object is the fixed reference for the alignment calculation. When you select objects using a frame, the bounding box of all selected objects is the reference.
- Selecting a user color did not change the current object. It was only used for the next new object.
- The Dash length/Dot gap value was increasing with each new object when the line width was >1.
- I fixed the print function, but I still strongly recommend to print via PS export and GhostScript. This will deliver much better results, because GhostScript can do all the nice rendering things like anti-aliasing, high-quality curves etc.
14 December 2008 - Version 3.0 final
Changes:
- Moving an object with cursor keys while the magnet is active will now align it with the grid instead of just moving by one pixel. The reference is the boundary of the selected object(s) in the moving direction, i.e. moving right, the right side is aligned, moving left, the left side is aligned with the grid. Using the cursor keys allows aligning objects with the grid in only either X or Y direction, whereas using the mouse aligns in both directions. Holding the Control key down while hitting a cursor key will move the object by 1 pixel as in the previous release. So, it's not necessary to turn the grid off for fine adjustments.
- Holding the Control key down limits movements to the horizontal direction. The left Alt key works vice versa, limiting to vertical movements. Both are useful for moving points or objects along one direction of the coordinate system, but not the other.
- WinFIG now saves the settings for grid and magnet.
Bug fixes:
- WinFIG finally handles custom colors correctly.
1 December 2008 - Version 3.0 beta 4
Please note that this is a beta version. It may still have serious bugs, causing loss of your work!Bug fixes:
- WinFIG crashed when activating the Rotate left/right tool.
- Fixed a bug in fig2dev. The LaTeX export did not produce correct output for splines.
25 October 2008 - Version 3.0 beta 3
Please note that this is a beta version. It may still have serious bugs, causing loss of your work!Changes:
- I was not satisfied that it requires permanent switwching between various functions to create compounds, align objects etc. Therefore I changed the handling of the following functions:
I moved the buttons to new toolbars next to the standard toolbar at the top. The buttons react on the currently selected object(s). This allows using them without changing between commands, i.e. to create a compound object, just hit the "glue" button and the currently selected objects are glued together. There is no need to switch between functions. This reduces the number of clicks, which are necessary. I think this usage pattern is more intuitive and also more similar to other applications that deal with manipulating objects.
- create compound
- open compound
- break compound
- convert line/spline
- edit picture object/text
- align
As a side effect the main toolbar has less buttons, which now fit in just two columns.Bug fixes:
- Program crashed when doing the following: activate "copy objects" button, drag the new object around, but cancel with right mouse button, switch back to "select objects".
- Magnet did not work when copying objects.
- The elastic box was not showing when creating a picture object.
- The caching of the LaTeX bitmaps of text objects was turned off, which caused a reload of the bitmap each time when moving a text object. This resulted in a considerable delay.
19 October 2008 - Version 3.0 beta 2
Please note that this is a beta version. It may still have serious bugs, causing loss of your work!This release only contains a minor change to the export tool fig2dev.exe, which may be important for all users with recent GhostScript installations.
Changes:
- fig2dev only recognized AFPL Ghostscript installations, not GPL Ghostscript installations. Therefore those export formats that require GhostScript did not deliver results when a GPL Ghostscript is installed.
- I updated the source archive in the downloads section.
14 October 2008 - Version 3.0 beta 2
Please note that this is a beta version. It may still have serious bugs, causing loss of your work!Changes:
- Project migrated to Visual Studio 2008.
- Grab arcs and splines at their outline instead of only at their support points.
- Includes latest gdiplus.dll.
Bug fixes:
- Nested compounds were not loaded correctly. Possible loss of data!
24 September 2008 - Version 3.0 beta 1
Please note that this is a beta version. It may still have serious bugs, causing loss of your work!Changes:
- Opaque moving of objects. Objects show their original shape and style while moving.
- Winfig now can create smart links. That means, end points of lines or splines can connect to other objects and follow their movements. This should be very useful for diagrams, graphs etc.
Example:
The circle A was moved from left to right. The arrow follows automatically. The blue dots mark the connections. Currently the following connections are possible.From end points of:
- lines
- splines
To any position on the outline of:
- boxes
- closed polygons
- circles
- ellipses
Connections to open objects are not possible. This is to reduce complexity caused by circular dependencies. Smart links are specific to WinFIG. Xfig will treat the connections as ordinary lines. So, if you work on a drawing in both, WinFIG and Xfig, you may lose the information about the links and have to reconnect them manually after re-importing to WinFIG. WinFIG offers a new menu item "Create Smart Links" in the "Edit" menu. This action will try to find possible connections between objects as described above.
- fig2dev contains an update to the PSTricks driver (see Gene Ressler's home page) in the Links section.
Bug fixes:
- pictex export did not work, because fig2dev.exe crashed.
- spline curves were slightly different from Xfig and PS export.