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

WritableRaster.setDataElements(int.int,Raster) handles offset inconsistently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • 2d
    • beta
    • generic
    • solaris_7

        The various classes implementing WritableRaster (i.e., those in sun/awt/image)
      contain inconsistent implementation of the method:

      setDataElements(int x, int y, Raster inRaster)

      The correct behavior is to copy the pixel at:

      (inRaster.getMinX(), inRaster.getMinY())

      to:

      (inRaster.getMinX() + x, inRaster.getMinY() + y)

      whereas some implementations incorrectly copy it to position (x, y) of
      the destination, ignoring the offset of inRaster.

      The bounds checking added for RFE 4411397 needs to be adjusted as well for
      those methods that had incorrect implementations.

      ==========================
      daniel.rice@Eng 2001-03-22

       setRect in WritableRaster, BytePackedRaster, and ByteInterleavedRaster are
      affected similarly, but should perform clipping of the current Raster versus
      the incoming Raster.

            dricesunw Daniel Rice (Inactive)
            dricesunw Daniel Rice (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: