Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4332475

Scale-version of drawImage does not work in 16bit colordepth (win95/NT)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • 2d
    • 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)
      ======================================================================

            campbell Christopher Campbell (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: