Author: vhennebert
Date: Thu Jan 30 12:09:33 2014
New Revision: 1562793
URL: http://svn.apache.org/r1562793
Log:
Brought the branch in sync with rev. 1560225 of trunk
Modified:
xmlgraphics/batik/branches/custom-FontFamilyResolver/ (props changed)
xmlgraphics/batik/branches/custom-FontFamilyResolver/sources/org/apache/batik/ext/awt/image/codec/imageio/
(props changed)
xmlgraphics/batik/branches/custom-FontFamilyResolver/sources/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFPainter.java
Propchange: xmlgraphics/batik/branches/custom-FontFamilyResolver/
------------------------------------------------------------------------------
svn:mergeinfo = /xmlgraphics/batik/trunk:1538971-1562792
Propchange:
xmlgraphics/batik/branches/custom-FontFamilyResolver/sources/org/apache/batik/ext/awt/image/codec/imageio/
('svn:mergeinfo' removed)
Modified:
xmlgraphics/batik/branches/custom-FontFamilyResolver/sources/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFPainter.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/custom-FontFamilyResolver/sources/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFPainter.java?rev=1562793&r1=1562792&r2=1562793&view=diff
==============================================================================
---
xmlgraphics/batik/branches/custom-FontFamilyResolver/sources/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFPainter.java
(original)
+++
xmlgraphics/batik/branches/custom-FontFamilyResolver/sources/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFPainter.java
Thu Jan 30 12:09:33 2014
@@ -156,7 +156,7 @@ public class AbstractWMFPainter {
* to overall size, else we will go after the end of the byte
array...
*/
_size = bit.length - offset;
- int pad = (_size / _height) - _width;
+ int pad = (_size / _height) - _width;
for (int j = 0; j < _height; j++) {
for (int i = 0; i < _width; i++) {
bitI[_width*(_height-j-1)+i] = palette [((int)bit[offset]
& 0x00ff)];
@@ -178,7 +178,7 @@ public class AbstractWMFPainter {
offset += 4;
}
- // populate the int array : each pixel correspond to a bit in the
byte array
+ // populate the int array : each pixel corresponds to a bit in the
byte array
int pos = 7;
byte currentByte = bit[offset];
// padded to long words
@@ -191,7 +191,8 @@ public class AbstractWMFPainter {
if (pos == -1) {
pos = 7;
offset++;
- currentByte = bit[offset];
+ if (offset < bit.length)
+ currentByte = bit[offset];
}
}
offset +=pad;