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 a new instance of this class based on the provided image, with an appearance that varies depending on the value of the flag. The possible flag values are: <dl> <dt><b>{@link SWT#IMAGE_COPY}</b></dt> <dd>the result is an identical copy of srcImage</dd> <dt><b>{@link SWT#IMAGE_DISABLE}</b></dt> <dd>the result is a copy of srcImage which has a <em>disabled</em> look</dd> <dt><b>{@link SWT#IMAGE_GRAY}</b></dt> <dd>the result is a copy of srcImage which has a <em>gray scale</em> look</dd> </dl>
@param device the device on which to create the image @param srcImage the image to use as the source @param flag the style, either <code>IMAGE_COPY</code>, <code>IMAGE_DISABLE</code> or <code>IMAGE_GRAY</code>
@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> <li>ERROR_NULL_ARGUMENT - if srcImage is null</li> <li>ERROR_INVALID_ARGUMENT - if the flag is not one of <code>IMAGE_COPY</code>, <code>IMAGE_DISABLE</code> or <code>IMAGE_GRAY</code></li> <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> </ul> @exception SWTException <ul> <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or is otherwise in an invalid state</li> <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the image is not supported</li> </ul> @exception SWTError <ul> <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> </ul>