GC.drawImage

Copies a rectangular area from the source image into a (potentially different sized) rectangular area in the receiver. If the source and destination areas are of differing sizes, then the source area will be stretched or shrunk to fit the destination area as it is copied. The copy fails if any part of the source rectangle lies outside the bounds of the source image, or if any of the width or height arguments are negative.

@param image the source image @param srcX the x coordinate in the source image to copy from @param srcY the y coordinate in the source image to copy from @param srcWidth the width in pixels to copy from the source @param srcHeight the height in pixels to copy from the source @param destX the x coordinate in the destination to copy to @param destY the y coordinate in the destination to copy to @param destWidth the width in pixels of the destination rectangle @param destHeight the height in pixels of the destination rectangle

@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if the image is null</li> <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> <li>ERROR_INVALID_ARGUMENT - if any of the width or height arguments are negative. <li>ERROR_INVALID_ARGUMENT - if the source rectangle is not contained within the bounds of the source image</li> </ul> @exception SWTException <ul> <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> </ul> @exception SWTError <ul> <li>ERROR_NO_HANDLES - if no handles are available to perform the operation</li> </ul>

  1. void drawImage(Image image, int x, int y)
  2. void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight)
    class GC
    void
    drawImage
    ()

Meta