public final class JPTextImage extends Object implements JPTextImageType
JPTextImageType interface.| Modifier and Type | Method and Description |
|---|---|
static JPTextImageType |
create(int width,
int height)
Create a new image.
|
int |
get(int x,
int y)
Retrieve a character in the image.
|
int |
getSilent(int x,
int y,
int v)
Retrieve a character in the image.
|
int |
height() |
boolean |
isInside(int x,
int y) |
void |
put(int x,
int y,
int value)
Set the character at
(x, y) to value |
void |
putSilent(int x,
int y,
int value)
Set the character at
(x, y) to value. |
int |
width() |
public static JPTextImageType create(int width, int height)
width - The widthheight - The heightpublic boolean isInside(int x,
int y)
isInside in interface JPTextImageTypex - The x coordinatey - The y coordinatetrue iff the given coordinates are inside the imagepublic void put(int x,
int y,
int value)
JPTextImageType(x, y) to valueput in interface JPTextImageTypex - The X coordinate (0 <= x < width must hold)y - The Y coordinate (0 <= y < height must hold)value - The character valuepublic void putSilent(int x,
int y,
int value)
JPTextImageType(x, y) to value. If x or
y is outside of the bounds of the image, no setting is performed
and no exceptions are raised.putSilent in interface JPTextImageTypex - The X coordinatey - The Y coordinatevalue - The character valuepublic int width()
width in interface JPTextImageTypepublic int height()
height in interface JPTextImageTypepublic int get(int x,
int y)
JPTextImageTypeget in interface JPTextImageTypex - The X coordinate (0 <= x < width must hold)y - The Y coordinate (0 <= y < height must hold)(x, y)public int getSilent(int x,
int y,
int v)
JPTextImageTypegetSilent in interface JPTextImageTypex - The X coordinatey - The Y coordinatev - The default value(x, y), or v iff the coordinates
are outside of the imageCopyright © 2016 <code@io7m.com> http://io7m.com