Bug 46757 - WMF Transcoding problems with positioning of elements
Summary: WMF Transcoding problems with positioning of elements
Status: NEW
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: Utilities (show other bugs)
Version: 1.8
Hardware: PC All
: P2 major
Target Milestone: ---
Assignee: Batik Developer's Mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-22 20:36 UTC by Andrew Barnham
Modified: 2009-02-22 20:36 UTC (History)
0 users



Attachments
Problematic .wmf resultant .svg with and without patches. (5.78 KB, application/zip)
2009-02-22 20:36 UTC, Andrew Barnham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Barnham 2009-02-22 20:36:54 UTC
Created attachment 23298 [details]
Problematic .wmf resultant .svg with and without patches.

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.