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

>> 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
point.

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);
                 }
                 else{
                    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

Carmen

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