Image.this
- this(Device device, int width, int height)
- this(Device device, Image srcImage, int flag)
- this(Device device, Rectangle bounds)
- this(Device device, ImageData data)
- this(Device device, ImageData source, ImageData mask)
- this(Device device, InputStream stream)
- this(Device device, String filename)
orgeclipseswtgraphicsImageImage
constructorsfunctionsstatic functionsstatic variablesvariables
Constructs an empty instance of this class with the width and height of the specified rectangle. The result may be drawn upon by creating a GC and using any of its drawing operations, as shown in the following example: <pre> Image i = new Image(device, boundsRectangle); GC gc = new GC(i); gc.drawRectangle(0, 0, 50, 50); gc.dispose(); </pre> <p> Note: Some platforms may have a limitation on the size of image that can be created (size depends on width, height, and depth). For example, Windows 95, 98, and ME do not allow images larger than 16M. </p>
@param device the device on which to create the image @param bounds a rectangle specifying the image's width and height (must not be null)
@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> <li>ERROR_NULL_ARGUMENT - if the bounds rectangle is null</li> <li>ERROR_INVALID_ARGUMENT - if either the rectangle's width or height is negative</li> </ul> @exception SWTError <ul> <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> </ul>