-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
1.4
-
x86
-
windows_95
Name: rlT66838 Date: 04/21/2000
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
What the code tries to do; Create an image: 100x1, and then draw it stretched:
100x100.
Run the applet with this html-file:
<HTML><BODY><APPLET code=main width=200 height=200 ></APPLET></BODY></HTML>
On my system it fails to draw any stretched image when colordepth is 16bit (32
is ok). Result is a filled box with a random color (not green in this case).
import java.awt.*;
public class main extends java.applet.Applet
{
private Image m_cImgStrech;
public void init()
{
m_cImgStrech = createImage( 100, 1 );
Graphics g = m_cImgStrech.getGraphics();
g.setColor( Color.green );
g.fillRect( 0, 0, 100, 1 );
g.dispose();
}
public void paint( Graphics a_cGfx )
{
a_cGfx.drawImage( m_cImgStrech, 10, 10, 100, 100, null );
}
}
(Review ID: 101214)
======================================================================