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

java.awt.Color.getRGB() doesn't behave as the documentation describes

XMLWordPrintable

    • 1.2.2
    • x86
    • windows_nt



      Name: bk70084 Date: 07/31/98


      Re bug Id 4160238

      I've examined the source for java.Color. It appears that the getRGB() method now returns the
      full 32 bit color value. Previously it masked out the alpha component. If this change is
      deliberate, only the documentation needs to be updated. Bits 24-31 are the alpha component.
        
      Currently HTML doc reads:
      public int getRGB()

           Returns the RGB value representing the color in the default sRGB ColorModel.
      (Bits 24-31 are 0xff, 16-23 are red,
           8-15 are green, 0-7 are blue).
        

      Perhaps getRGBA should have been deprecated.
      The functionality of extracting a pure color, previously offered by getRGB, is now missing.

      Regards Peter Wilson
      (Review ID: 35719)
      ======================================================================

            mbronsonsunw Mike Bronson (Inactive)
            bklocksunw Brian Klock (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: