|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.jot.image.JOTAbstractImage
public class JOTAbstractImage
Represent an image data in a plain format, decoupled from storage format and AWT. Data is stored in simple byteArray, RGBA(4 ints per pixel) ~ potentially a memory hog.
| Field Summary | |
|---|---|
static int |
ALPHA_SUPPORT_NONE
Default: Alpha values are ignored, but much faster perfomance |
static int |
ALPHA_SUPPORT_SIMPLE_BLEND
If a pixel is set a new color, we will mix the new color with the old one. |
| Constructor Summary | |
|---|---|
JOTAbstractImage(int width,
int height)
|
|
JOTAbstractImage(int width,
int height,
int alphaSupport)
|
|
| Method Summary | |
|---|---|
void |
drawFilledRectangle(int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel)
|
protected void |
drawHorizontalLine(int lineThickness,
int x,
int x2,
int y,
JOTAbstractPixel pixel)
|
void |
drawLine(int lineThickness,
int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel)
|
void |
drawRectangle(int lineThickness,
int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel)
|
protected void |
drawVerticalLine(int lineThickness,
int x,
int y,
int y2,
JOTAbstractPixel pixel)
|
void |
fillImage(JOTAbstractPixel pixel)
fill the whole image with the same pixel ie: set a background |
int |
getColorDepth(long maxColors)
return the color depth in bits (ie: how big the palette needs to be) ie: 1: 2 colors or less 4: 16 colors or less 8: 256 colors or less 16: 65536 colors or less 24: 16 777 216 colors or less 32: > 16 777 216 colors resource intensive Note: maxColors, is the maximum you want to look for, if more that "maxColor" colors are found, an exception will be thrown. |
int[] |
getData()
|
int |
getHeight()
|
JOTAbstractPixel |
getPixel(int x,
int y)
|
int |
getWidth()
|
void |
setPixel(int x,
int y,
JOTAbstractPixel pixel)
|
int |
writeToStream(JOTAbstractImageWriterInterface imageWriter,
java.io.OutputStream stream)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ALPHA_SUPPORT_NONE
public static final int ALPHA_SUPPORT_SIMPLE_BLEND
| Constructor Detail |
|---|
public JOTAbstractImage(int width,
int height,
int alphaSupport)
width - height - alphaSupport: - default is alpha support disabled(faster)
public JOTAbstractImage(int width,
int height)
| Method Detail |
|---|
public void setPixel(int x,
int y,
JOTAbstractPixel pixel)
public JOTAbstractPixel getPixel(int x,
int y)
public int[] getData()
public int getHeight()
public int getWidth()
public int getColorDepth(long maxColors)
throws java.lang.Exception
java.lang.Exception
public void drawRectangle(int lineThickness,
int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel)
public void drawFilledRectangle(int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel)
public void fillImage(JOTAbstractPixel pixel)
pixel -
public void drawLine(int lineThickness,
int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel)
protected void drawHorizontalLine(int lineThickness,
int x,
int x2,
int y,
JOTAbstractPixel pixel)
protected void drawVerticalLine(int lineThickness,
int x,
int y,
int y2,
JOTAbstractPixel pixel)
public int writeToStream(JOTAbstractImageWriterInterface imageWriter,
java.io.OutputStream stream)
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||