Package com.io7m.jptbox.core
Interface JPTextImageType
- All Known Implementing Classes:
JPTextImage
public interface JPTextImageType
The type of text images.
-
Method Summary
Modifier and TypeMethodDescriptionintget(int x, int y) Retrieve a character in the image.intgetSilent(int x, int y, int v) Retrieve a character in the image.intheight()booleanisInside(int x, int y) voidput(int x, int y, int value) Set the character at(x, y)tovaluevoidputSilent(int x, int y, int value) Set the character at(x, y)tovalue.intwidth()
-
Method Details
-
isInside
boolean isInside(int x, int y) - Parameters:
x- The x coordinatey- The y coordinate- Returns:
trueiff the given coordinates are inside the image
-
put
void put(int x, int y, int value) Set the character at(x, y)tovalue- Parameters:
x- The X coordinate (0 <= x < widthmust hold)y- The Y coordinate (0 <= y < heightmust hold)value- The character value
-
putSilent
void putSilent(int x, int y, int value) Set the character at(x, y)tovalue. Ifxoryis outside of the bounds of the image, no setting is performed and no exceptions are raised.- Parameters:
x- The X coordinatey- The Y coordinatevalue- The character value
-
width
int width()- Returns:
- The width of the image
-
height
int height()- Returns:
- The height of the image
-
get
int get(int x, int y) Retrieve a character in the image.- Parameters:
x- The X coordinate (0 <= x < widthmust hold)y- The Y coordinate (0 <= y < heightmust hold)- Returns:
- The character at
(x, y)
-
getSilent
int getSilent(int x, int y, int v) Retrieve a character in the image.- Parameters:
x- The X coordinatey- The Y coordinatev- The default value- Returns:
- The character at
(x, y), orviff the coordinates are outside of the image
-