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

Compatibility: applet:zoo fails to paint gifs under GDI but works under DX

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs
    • 2d
    • x86
    • windows_nt

      Build : FCS 'N'
      OS : 95 only (NT w/o ddraw.dll fine)
      bitdepth: all (ONLY IN GDI, DX fine)

      applet:zoo which creates an offScrImage of the individual zoo animals gif images fails to draw under GDI. Dx fine.

      Regression testing shows:
      > /usr/local/java/jdk1.2beta4 - ok in this build.
      > /usr/local/java/jdk1.2beta4.1 -failed.
      > /usr/local/java/jdk1.2beta4.2 -failed.


      Some interesting observations about zoo :

      in animals.java when commenting out

        g.drawImage(background, 0, 0, width, height, this);

      the animal gifs are rendered.

      This code in init() doesn't do anything :

              Image offScrImage = createImage(width, height);
              Graphics offScrGC = offScrImage.getGraphics();
              offScrGC.drawImage(background, 0, 0, width, height, this);

      when it's commented out on Solaris all the images render. However, on win95 with GDI and with DDraw none of the images render. Rather peculiar!

      Instead of using imageUpdate() to wait for all the images to load the applet could make use of MediaTracker. However, the animal gifs still do not render under GDI when the background gif is rendered.

      This applet lives at

      /home/lichtenw/JavaMedia/2d/tests/applets/zoo

      The applet was taken from the Book : Java Programmer's Library.

      To reproduce under win95 :

      cd zoo
      java -J-Dsun.java2d.noddraw= *.html

      brian.lichtenwalter@Eng 1998-10-13

            dfeldsunw Dmitry Feld (Inactive)
            rckim Robert Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: