|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Surface is a 2d array of int values. It is an abstraction of an image or game board
allowing the floating eye to access it without knowing details. Surface objects implementing
this interface should not be used until setImage()
has been called.
setImage()
should reset the image pixels, but not the size of the image, so
the same object can be used for multiple images. Size of surface is set via properties - if
size is not set via properties, defaults to size of first image set via
setImage()
.
Field Summary | |
static java.lang.String |
SURFACE_HEIGHT_KEY
final size of surface to which images will be scaled |
static java.lang.String |
SURFACE_WIDTH_KEY
final size of surface to which images will be scaled |
static java.lang.String |
TRANSFORMER_CLASS_KEY
class to perform image transformation; subclass of BufferedImageTransformer |
Method Summary | |
int[] |
getData()
|
int |
getHeight()
|
int |
getValue(int x,
int y)
|
int |
getWidth()
|
void |
setImage(java.io.File file)
Set source data of image. |
int[] |
transform(TransformParameters parms)
transform image via translate, rotate, scale, crop |
Methods inherited from interface com.anji.util.Configurable |
init |
Field Detail |
public static final java.lang.String TRANSFORMER_CLASS_KEY
public static final java.lang.String SURFACE_WIDTH_KEY
public static final java.lang.String SURFACE_HEIGHT_KEY
Method Detail |
public void setImage(java.io.File file) throws java.io.IOException
file
-
java.io.IOException
public int[] transform(TransformParameters parms)
parms
-
public int[] getData()
public int getWidth()
public int getHeight()
public int getValue(int x, int y)
x
- y
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |