public class ImageOverlayUtil extends Object
Modifier and Type | Field and Description |
---|---|
static org.eclipse.swt.graphics.PaletteData |
PALETTE
24 bit direct palette used for overlay.
|
Constructor and Description |
---|
ImageOverlayUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
overlay(org.eclipse.swt.graphics.Image base,
org.eclipse.swt.graphics.Image overlay)
Overlay image onto base image.
|
static boolean |
overlay(org.eclipse.swt.graphics.Image base,
int[][] pixels,
int alpha)
Overlay pixels onto base image.
|
static boolean |
overlay(org.eclipse.swt.graphics.Image base,
int width,
int[] pixels,
int alpha)
Overlay pixels onto base image.
|
public static final org.eclipse.swt.graphics.PaletteData PALETTE
public static boolean overlay(org.eclipse.swt.graphics.Image base, org.eclipse.swt.graphics.Image overlay)
base
- the target image to add overlayoverlay
- the overlay image. alpha value of the Image should be set in
advance.public static boolean overlay(org.eclipse.swt.graphics.Image base, int[][] pixels, int alpha)
base
- the target image to add overlaypixels
- the pixel data array of the overlay image in [y][x] formatalpha
- the global alpha value to be used for every pixelto understand how to specify pixel value
public static boolean overlay(org.eclipse.swt.graphics.Image base, int width, int[] pixels, int alpha)
base
- the target image to add overlaywidth
- the width of the overlay imagepixels
- the pixel data array of the overlay imagealpha
- the global alpha value to be used for every pixelto understand how to specify pixel value