Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-889

WMF Transcoding problems with positioning of elements

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Utilities
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC

      Description

      Hi Had a few problems with some wmf's I am trying to convert into svg.

      See attached .zip file. It contains 3 items:

      Original WMF
      Resultant SVG that Batik 1.8pre emits (with clipping removed, I hacked dom to remove it because causes me troubles)
      Resultant SVG after I patched in some hacks into code.

      I hacked in some fixes so not a critical issue for me, but would be nice for a fix to appear so that I don't have to maintain a patched version for my own needs.

      Hack #1 - org.apache.batik.transcoder.wmf.tosvg.WMFRecordStore

      253c
      } else

      { ySign = 1; }

      .
      249c
      } else

      { xSign= 1; }

      .

      This one definitly looks like a bug to me. If I have a view port/window thingo that sets up a port with -ve numbers then a second one with +ve numbers then xSign/ySign do not get reset. Looks like to me that they should.

      Hack #2 - VpX/VpY settings. Image was not aligned/offset correctly.

      183,184c
      currentStore.setVpX( vpX = (float)mr.elementAt( 0 ) );
      currentStore.setVpY( vpY = (float)mr.elementAt( 1 ) );
      .

      Original code havd -ves in there. Dunno why but when I removed them my .wmf to .svg came good (almost) - it is not aligned quite the way I'd like it but it's close enough for my purposes.

        Attachments

        1. examples.zip
          6 kB
          Andrew Barnham

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              andrew.barnham@gmail.com Andrew Barnham
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: