Runtime

## org.eclipse.gmf.runtime.common.ui.util
Class OverlayImageDescriptor

    java.lang.Object
      org.eclipse.jface.resource.DeviceResourceDescriptor
          org.eclipse.jface.resource.ImageDescriptor
              org.eclipse.jface.resource.CompositeImageDescriptor
                  org.eclipse.gmf.runtime.common.ui.util.OverlayImageDescriptor

public class OverlayImageDescriptor
extends CompositeImageDescriptor

Allows one image descriptor to be overlayed on another image descriptor to generate a new image. Commonly used to decorate an image with a second image decoration.

Field Summary

Fields inherited from class org.eclipse.jface.resource.ImageDescriptor
`DEFAULT_IMAGE_DATA`

Constructor Summary
`OverlayImageDescriptor(Image srcImage, ImageDescriptor overlayDesc)` OverlayImageDescriptor constructor
`OverlayImageDescriptor(Image srcImage, ImageDescriptor overlayDesc, int width, int height)` OverlayImageDescriptor constructor where you can set the width and height

Method Summary
`protected void` `drawCompositeImage(int width, int height)` Draws the given source image data into this composite image at the given position.
`protected Point` `getSize()` Retrieve the size of this composite image.

Methods inherited from class org.eclipse.jface.resource.CompositeImageDescriptor
`drawImage, getImageData`

Methods inherited from class org.eclipse.jface.resource.ImageDescriptor
`createFromFile, createFromImage, createFromImage, createFromImageData, createFromURL, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getMissingImageDescriptor`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OverlayImageDescriptor

    public OverlayImageDescriptor(Image srcImage,
                                  ImageDescriptor overlayDesc)

  OverlayImageDescriptor constructor

Parameters:
  `srcImage` - the base image
  `overlayDesc` - the overlay image

### OverlayImageDescriptor

    public OverlayImageDescriptor(Image srcImage,
                                  ImageDescriptor overlayDesc,
                                  int width,
                                  int height)

  OverlayImageDescriptor constructor where you can set the width and height

Parameters:
  `srcImage` - the base image
  `overlayDesc` - the overlay image
  `width` - an int with the width of the image in pixels
  `height` - an int with the height of the image in pixels

Method Detail

### drawCompositeImage

    protected void drawCompositeImage(int width,
                                      int height)

  Draws the given source image data into this composite image at the given position.

  Parameters:
    `width` - the width of the image.
    `height` - the height of the image.
  See Also:
    `CompositeImageDescriptor.drawCompositeImage(int, int)`

### getSize

    protected Point getSize()

  Retrieve the size of this composite image.

  Returns:
    the x and y size of the image expressed as a point object
  See Also:
    `CompositeImageDescriptor.getSize()`

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.