Subject: Re: vector graphics support (was Re: image support (was ...))
From: Caolan McNamara (cmc@stardivision.de)
Date: Fri Mar 03 2000 - 02:13:15 CST
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 02.03.00, 22:19:57, Paul Rohr <paul@abisource.com> wrote regarding 
vector graphics support (was Re: image support (was ...)):
> At 01:28 PM 3/2/00 -0500, Jon Niehof wrote:
> >IIRC, wv complained about not including WMF support in my
> >build, since I didn't have the appropriate library
> >installed. Do you think we could use wv's support as a
> >basis? It seems like it should handle it...
> The other part of this thread was discussing raster image formats, 
which can
> all be converted to our native PNG via existing libraries.
> Over the long term, our approach for vector graphics (like WMF) should
> probably be to handle them all by converting to a single native vector
> format (which we have yet to support at all).  The obvious candidate 
here is
> SVG, which has managed to be both bloated and immature, but still 
seems to
> be headed for PNG-equivalent status among vector-graphic formats.  
Clearly,
> adding enough GR_Graphics support for an XP implementation of a 
reasonable
> subset of SVG would be a cool feature for AbiWord.
> In the mean time, I believe people were considering doing lossy 
conversions
> from vector formats like WMF directly to a raster representation (ie, 
PNG).
> That way we could still display those images, even though any future 
ability
> to edit them properly would be lost.
> As people volunteer to tackle this problem, they'll face the tradeoffs 
of
> implementing the following two code paths:
>   (a) WMF, etc. --> SVG --> GR_Graphics --> display
>   (b) WMF, etc. --> PNG --> display
FWIW libwmf can do the wmf to png conversion at the moment. I'd love 
to see a wmf to svg conversion as part of it but I do not have any svg 
knowledge myself. Libwmf was stuck together similiar to libwv so there 
are about 20 function pointers which someone can fill in. One for line 
drawing, circles, polylines, floodfill etc etc. Looking at the png 
example and the X drawing example that are included should make it 
pretty easy to create a wmf to svg conversion library on top of it. 
Even if a different route is taken I documented as best I could the 
wmf format at 
http://www.csn.ul.ie/~caolan/publink/libwmf/libwmf/doc/index.html . 
With much searching for docs, and guesswork and Wine trawling I think 
that its pretty complete. Definitely good enough for nearly every 
conversion. The only place where things get difficult is on text 
handling. There is a reasonable sophisticated text rendering system in 
windows which is a pain to map to X, and difficult for me to work out 
with freetype (for the png)
C.
This archive was generated by hypermail 2b25 : Fri Mar 03 2000 - 02:12:07 CST