SWT的预定了一些图像的效果:
The flag argument is a static constant of either SWT.IMAGE_COPY, SWT.IMAGE_DISABLE or SWT.IMAGE_GRAY. Copy creates a new image based on the original but with a copy of its imageData, whereas Disable and Gray create a new image applying platform specific effects.
Image ideaImage = new Image(display,
getClass().getResourceAsStream("/icons/Idea.jpg");
Image disabledImage = new Image(display,image,SWT.IMAGE_DISABLE);
Image grayImage = new Image(display,image,SWT.IMAGE_GRAY);
Image copyImage = new Image(display,ideaImage,SWT.IMAGE_COPY);
GC gc = new GC(copyImage);
gc.drawText("This is a copy",0,0);
gc.dispose();