W3C home > Mailing lists > Public > www-svg@w3.org > March 1999

RE: More svg questions - Example request, and WMF conversion

From: Delessio, Carmen <CDelessio@modempoppe.com>
Date: Tue, 30 Mar 1999 17:42:51 -0500
Message-ID: <7C75BD67A3E4D211BFDA0090273C6FE41553C3@smtp02.ctus.modempoppe.com>
To: "'Chris Lilley'" <chris@w3.org>
Cc: svg <www-svg@w3.org>
>> Since I have the WMF viewer in Java,
>> I do not think it will be a big stretch to the create a simple SVG
>> viewer for WMF type files.

>You mean, by converting SVG to WMF? Or do you mean, having written one ,
>another will be easier?

Without promising too much, I mean by having written one, another will be
easier.  The current code does not use Java2D and has a relatively limited
number of WMF functions supported, but I think it will make a good starting

See http://www.blackdirt.com/graphics/wmfImage.java . There is code there
that plays the WMF.  Ignoring a lot of housekeeping and conversion, the code
to draw an oval ends with 

                 if (drawFilled){
                    g.fillOval (x,y,w,h);
                    g.drawOval (x,y,w,h);


The list of supported WMF functions follows.  This has been sufficient to
render images well.

            case 0x2fa: // create pen indirect
            case 0x6ff: // create region
            case 0x2fb: // createFontIndirect
            case 0x12d: // select object
            case 0x1f0: // delete object
            case 0x41b: // rectangle
            case 0x418: // Oval
            case 0x325: // polyline
            case 0x324: // polygon
            case 0x538: // polypolygon
            case 0x214: // moveto
            case 0x213: // lineto
            case 0x209: // set text color
            case 0x201: // set BK color
            case 0xa32: // exttext...
            case 0x521: // TEXTOUT
            case 0xF43: // stretch DIB
            case 0x20B: // set_window_org
            case 0x20C: // set_window_ext

Received on Tuesday, 30 March 1999 17:40:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:46 UTC