I hope I don't bore the readers with another Whiskey-Papa-Golf goodies.
So far, at least I make some steady progress with the wpg2odg. Yes, this is a command-line tool which will convert WordPerfect Graphics into OpenDocument Graphics. From perfection to openness, so to speak. The corresponding UNO service (for seamless import from within OpenOffice.org) is planned, but I can't say when I could finish it.
As style handling in ODG is more complicated than SVG, my work with respect to stroke and fill properties of the objects isn't very fast. However, at least the outlines/paths are already imported properly. Shown in the screenshot below is OpenOffice.org opening eiffel.odg, which is the result of running "wpg2odg eiffel.wpg eiffel.odg". Compare it to the rendering in Corel Presentation and Inkscape as in my previous blog entry. So, it's like Eiffel in wireframe mode.
Of course, it's rather boring. But given couple of more days, I hope all the wonderful colors will be there.
Since libwpg is designed to be portable, I checked its status in non-Linux environment. So far I have tried to compile it on Win32 (not necessarily as dynamic library, lack of knowledge from my side) and it works well. At least with Microsoft, Borland, and GCC (Mingw) compilers. I am going to give it a try with Digital Mars and OpenWatcom later on, but I don't foresee any serious problem with the code.
I used the chance also to verify Perfectspot, another toy of mine which uses libwpg to show WPG files. So basically it's a stand-alone WPG viewer. I'll perhaps release it when it's fully polished, not sure yet whether there is a demand for such tool. Perfectspot is Qt4-based and using Arthur to render the graphics onto the screen. Screenshot can be seen below. The beautiful Earth is drawn by Marcelo Staudt (available in from Open Clip Art library). I just imported his SVG file into Corel Presentation X3 and then save it as WPG. Perfectspot opens and displays the WPG file just fine. Note how smooth is Perfectspot's rendering due to the antialiasing feature in Qt4, compared to that of Presentation's.
Since this blog got anothers hits from someone at microsoft.com with respect to WPG stuff, I decided to find out how good is the support for WPG in Microsoft Office. I inserted my favorite windmill picture (see the entry on gradient support) in PowerPoint 2002 and this is what I got:
Seems that the importer and/or PowerPoint has problem with compound polygons or grouped objects. Look at the blade in the middle (which consists of some sub paths), it should be transparent just like the other blades. Compare it to what our wonderful Karbon14 renders:
Also notice the lack of antialiasing in PowerPoint. Strangely enough, this is only for imported pictures. When I clicked and converted the inserted picture into Office drawing, then it was smoothly painted.
Alas, I saw another problem with the gradients. Instead of creating polygon with gradient fill, the import filter of PowerPoint splits the polygon into smaller polygon and fills it with solid color, as can be seen below (I select couple of those polygons to show that they are many many small objects indeed). You can quickly spot it if your eyes have native Sobel filter :-)
Is it only the case with Microsoft Office 2002? To verify it, I gave Office 2007 Beta a try. Despite its brand new user interface, it is just the same case: one blade is not transparent and gradient is converted to color bands:
Conclusion: when I am finally finished with all this endeavour, it is likely that applications like OpenOffice.org, Karbon14, and Inkscape can handle WPG files better than Microsoft Office. Or should we ask Microsoft to just use libwpg?