public class EMSPicture extends EMSElement
Pictures are coded from upper left to lower right and in each byte the most significant bit represent the pixel at the left. The pictures are plain black and white, no colours or grey scales are supported. The bitvalue "0" represents a white pixel and the bitvalue "1" represents a black pixel.
There are three differend types of EMS pictures:
Modifier and Type | Field and Description |
---|---|
static int |
LARGE
Picture type: LARGE (32x32)
|
static int |
SMALL
Picture type: SMALL (16x16)
|
static int |
VARIABLE
Picture type: VARIABLE
|
Constructor and Description |
---|
EMSPicture(byte[] picture)
Construct a small or large EMS Picture.
|
EMSPicture(byte[] picture,
int width,
int height)
Construct a new variable sized EMS Picture.
|
EMSPicture(java.awt.Image img)
Construct a new EMS Picture.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Image |
getImage() |
byte[] |
getImageData() |
java.lang.String |
toString() |
public static final int SMALL
public static final int LARGE
public static final int VARIABLE
public EMSPicture(byte[] picture) throws java.lang.IllegalArgumentException
picture
- the picture datajava.lang.IllegalArgumentException
- if the picture is null or is neither a
small (32 octets) or large (128 octets) picture.public EMSPicture(byte[] picture, int width, int height)
The width of the picture must be a multiple of 8 pixels up to the screen width (ie. 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96).
The height of the picture may be from 1 to 255 pixels.
Note: The total product of Width and Height must never exceed 1024 pixels (128 octets).
picture
- the picture data.width
- the width of the picture in pixelsheight
- the height of the picture in pixels.java.lang.IllegalArgumentException
- if the picture is null, the picture data
exceeds 128 octets or the width or height parameter has an illegal value.public EMSPicture(java.awt.Image img)
The width of the picture must be a multiple of 8 pixels up to the screen width (ie. 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96).
The height of the picture may be from 1 to 255 pixels.
Note: The total product of Width and Height must never exceed 1024 pixels (128 octets).
object XP, Inc. © 2000-2013. All rights reserved object XP