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

Graphics2D.drawRenderedImage draws a child Raster at an incorrect position

    XMLWordPrintable

Details

    • 2d
    • 1.3
    • generic
    • solaris_7

    Description

      A test case is enclosed which provides a minimal implementation of the
      RenderedImage interface. The image extends from (100, 100) and is 200x200
      in size. It has a single tile which has its origin at (0, 0).

      The image's getData(Rectangle) method is implemented so that it may either
      return a newly created Raster with its origin at (100, 100), or alternatively
      return a child of the tile Raster. A simple UI is provided that allows
      toggling between to images, one with each setting.

      The images are drawn into a Canvas using the Graphics2D.drawRenderedImage
      method. The new raster (yellow) image is drawn corrently, with its origin
      at (100, 100). However, the child Raster (blue) image is drawn with
      an incorrect origin.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: