|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JGImage
Image functionality
Method Summary | |
---|---|
JGImage |
crop(int x,
int y,
int width,
int height)
|
JGImage |
flip(boolean horiz,
boolean vert)
|
JGPoint |
getSize()
Get image size. |
boolean |
isOpaque(int alpha_thresh)
True means the image may have some transparent pixels below the given alpha threshold, false means image is completely opaque. |
JGImage |
loadImage(java.lang.String imgfile)
Load image from resource path (using getResource). |
void |
purgeImage(java.lang.String imgfile)
Purge image with the given resourcename from the cache. |
JGImage |
rotate(int angle)
for angle, only increments of 90 are allowed |
JGImage |
rotateAny(double angle)
Image is rotated by rot (radians). |
JGImage |
scale(int width,
int height)
Returns a smoothly scaled image using getScaledInstance. |
JGImage |
toDisplayCompatible(int thresh,
JGColor bg_col,
boolean fast,
boolean bitmask)
Turn a (possibly) translucent or indexed image into a display-compatible bitmask image using the given alpha threshold and render-to-background colour, or to display-compatible translucent image. |
Method Detail |
---|
JGImage loadImage(java.lang.String imgfile)
void purgeImage(java.lang.String imgfile)
JGPoint getSize()
boolean isOpaque(int alpha_thresh)
JGImage rotate(int angle)
JGImage rotateAny(double angle)
JGImage flip(boolean horiz, boolean vert)
JGImage scale(int width, int height)
JGImage crop(int x, int y, int width, int height)
JGImage toDisplayCompatible(int thresh, JGColor bg_col, boolean fast, boolean bitmask)
thresh
- alpha threshold between 0 and 255fast
- use fast algorithm (only set bg_col behind transp. pixels)bitmask
- true=make bitmask, false=make translucent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |