Images

  1. ImageBlock

    For each distinct image name, there is at most one ImageBlock object. An image name consists of a root name plus width and height information, since psfile specials can specify scaling in both dimensions. ImageBlock objects are managed by static methods of the ImageBlock class.

    For each distinct ImageBlock and scale factor, at most one java.awt.Image object is created. These are managed by the ImageBlock object.

  2. ImageView

    The ImageView class implements the ImageObserver interface, so that it can display an image asynchronously as it is being downloaded.

    Every time that an ImageView is needed in order to display an image, a new one is created with a pointer to the Image object maintained by the ImageBlock. This is required because of the design of the java.awt.image.ImageObserver interface -- there is no way to determine from the ImageObserver callback interface at what position the Image was being drawn on the screen. The ImageObserver callback interface is used to get progressive painting of images as they are downloaded.