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

WPrinterJob should not assume that every Color / Paint is RGB

XMLWordPrintable

    • 2d
    • beta
    • x86
    • windows_xp



      Name: pr15447 Date: 02/06/2004


      FULL PRODUCT VERSION :
      java version "1.4.2_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
      Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

      FULL OS VERSION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      The WPrinterJob Class assumes that every Color is an RGB Color. For example the fillRect Method:

          protected void fillRect(float x, float y, float width, float height,
      Color color) {

      float[] rgb = color.getColorComponents(null);
       
      fillRect(mPrintDC, x, y, width, height,
      (int) (rgb[0] * MAX_WCOLOR),
      (int) (rgb[1] * MAX_WCOLOR),
      (int) (rgb[2] * MAX_WCOLOR));
          }


      We are using an CMYK ColorSpace and the color.getColorComponents(null) return's CMYK not RGB.



      REPRODUCIBILITY :
      This bug can be reproduced often.
      (Incident Review ID: 218162)
      ======================================================================

            jgodinez Jennifer Godinez (Inactive)
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: