aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/image
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-07-14 05:33:30 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-07-14 05:33:30 +0000
commit6a71677713a891ed583f065f21e40e3d4d89562c (patch)
tree325c55b07a6af031947ba6f55a84fc7897bf374b /libjava/java/awt/image
parent6e98504002b3ee32c9b3d17da648b01e1424f833 (diff)
downloadgcc-6a71677713a891ed583f065f21e40e3d4d89562c.zip
gcc-6a71677713a891ed583f065f21e40e3d4d89562c.tar.gz
gcc-6a71677713a891ed583f065f21e40e3d4d89562c.tar.bz2
MemoryImageSource.java, [...]: New versions from classpath.
2003-07-14 Michael Koch <konqueror@gmx.de> * java/awt/image/MemoryImageSource.java, java/beans/PropertyEditorManager.java, javax/naming/CompoundName.java, javax/naming/spi/NamingManager.java, javax/swing/AbstractButton.java, javax/swing/ButtonModel.java, javax/swing/SwingUtilities.java, javax/swing/UIManager.java, javax/swing/colorchooser/DefaultColorSelectionModel.java, javax/swing/event/AncestorEvent.java, javax/swing/event/InternalFrameEvent.java, java/util/zip/ZipFile.java: New versions from classpath. From-SVN: r69321
Diffstat (limited to 'libjava/java/awt/image')
-rw-r--r--libjava/java/awt/image/MemoryImageSource.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/libjava/java/awt/image/MemoryImageSource.java b/libjava/java/awt/image/MemoryImageSource.java
index 0e8d462..5006afe 100644
--- a/libjava/java/awt/image/MemoryImageSource.java
+++ b/libjava/java/awt/image/MemoryImageSource.java
@@ -74,7 +74,7 @@ public class MemoryImageSource implements ImageProducer
this.props = props;
int max = (( scansize > width ) ? scansize : width );
pixelb = new byte[ max * height ];
- System.arraycopy( pix, 0, pixelb, 0, max );
+ System.arraycopy( pix, 0, pixelb, 0, max * height );
}
/**
Constructs an ImageProducer from memory
@@ -100,7 +100,7 @@ public class MemoryImageSource implements ImageProducer
this.props = props;
int max = (( scansize > width ) ? scansize : width );
pixeli = new int[ max * height ];
- System.arraycopy( pix, 0, pixeli, 0, max );
+ System.arraycopy( pix, 0, pixeli, 0, max * height );
}
/**
Constructs an ImageProducer from memory using the default RGB ColorModel
@@ -226,6 +226,7 @@ public class MemoryImageSource implements ImageProducer
if( props != null ) {
ic.setProperties( props );
}
+ ic.setDimensions(width, height);
if( pixeli != null ) {
ic.setPixels( 0, 0, width, height, cm, pixeli, offset, scansize );
} else {