You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2007/12/26 12:18:05 UTC
svn commit: r606882 -
/xmlgraphics/batik/trunk/sources/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java
Author: cam
Date: Wed Dec 26 03:18:04 2007
New Revision: 606882
URL: http://svn.apache.org/viewvc?rev=606882&view=rev
Log:
Correctly position text from isotropic WMFs. Fixes bug 43954.
Modified:
xmlgraphics/batik/trunk/sources/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java?rev=606882&r1=606881&r2=606882&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.java Wed Dec 26 03:18:04 2007
@@ -106,7 +106,7 @@
case WMFConstants.META_EXTTEXTOUT:
{
int yVal = readShort( is ) * ySign;
- int xVal = readShort( is ) * xSign;
+ int xVal = (int) (readShort( is ) * xSign * scaleXY);
int lenText = readShort( is );
int flag = readShort( is );
int read = 4; // used to track the actual size really read
@@ -115,9 +115,9 @@
int len;
// determination of clipping property
if ((flag & WMFConstants.ETO_CLIPPED) != 0) {
- x1 = readShort( is ) * xSign;
+ x1 = (int) (readShort( is ) * xSign * scaleXY);
y1 = readShort( is ) * ySign;
- x2 = readShort( is ) * xSign;
+ x2 = (int) (readShort( is ) * xSign * scaleXY);
y2 = readShort( is ) * ySign;
read += 4;
clipped = true;
@@ -170,7 +170,7 @@
read += (len + 1) / 2;
int yVal = readShort( is ) * ySign;
- int xVal = readShort( is ) * xSign;
+ int xVal = (int) (readShort( is ) * xSign * scaleXY);
read += 2;
// if the record was not completely read, finish reading
if (read < recSize) for (int j = read; j < recSize; j++) readShort( is );