|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.aerith.misao.image.Buffer
|
+--net.aerith.misao.image.ShortBuffer
The ShortBuffer is a class of short array for an image
buffer.
The return value of get and the value for set
is between 0 and 65535. If 65537 is passed to set, it is
converted to 1. If -1 is passed, it is converted to 65535.
The value in the buffer 0 represents 0, 32767 does 32767, -32768 does 32768, and -1 does 65535.
| Field Summary | |
private short[] |
pixels
The buffer to keep short values of the image. |
| Fields inherited from class net.aerith.misao.image.Buffer |
signed_flag,
size |
| Constructor Summary | |
ShortBuffer(Size allocate_size)
Constructs a ShortBuffer, allocates the buffer. |
|
| Method Summary | |
Buffer |
cloneBuffer()
Creates a clone image buffer. |
int |
get(int x,
int y)
Gets pixel value of a specified position. |
double |
getValue(int x,
int y)
Gets pixel value of a specified position. |
void |
inverse()
Inverses white and black. |
void |
read(java.io.DataInput input,
Size size)
Reads pixel values and set pixel values into the buffer. |
void |
reverseHorizontally()
Reverses left to the right. |
void |
reverseVertically()
Reverses upside down. |
void |
set(int x,
int y,
int value)
Sets pixel value of a specified position. |
void |
setValue(int x,
int y,
double value)
Sets pixel value of a specified position. |
void |
write(java.io.DataOutput output)
Write pixel values into the specified stream. |
| Methods inherited from class net.aerith.misao.image.Buffer |
getDataCount,
getSize,
getValueAt,
setSigned |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private short[] pixels
| Constructor Detail |
public ShortBuffer(Size allocate_size)
ShortBuffer, allocates the buffer.allocate_size - the buffer size.| Method Detail |
public int get(int x,
int y)
throws java.lang.IndexOutOfBoundsException
x - the x position.y - the y position.
public void set(int x,
int y,
int value)
throws java.lang.IndexOutOfBoundsException
x - the x position.y - the y position.value - the value to set.
public double getValue(int x,
int y)
throws java.lang.IndexOutOfBoundsException
x - the x position.y - the y position.
public void setValue(int x,
int y,
double value)
throws java.lang.IndexOutOfBoundsException
x - the x position.y - the y position.value - the value to set.
public void read(java.io.DataInput input,
Size size)
throws java.io.IOException
input - the input stream pointing to the start of int
data.size - the size of image.
public void write(java.io.DataOutput output)
throws java.io.IOException
output - the output stream.public void inverse()
public void reverseVertically()
public void reverseHorizontally()
public Buffer cloneBuffer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||