public class JHelpMask
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
private byte[] | 
data
Data of mask 
 | 
private int | 
height
Mask height 
 | 
private int | 
width
Mask width 
 | 
| Modifier | Constructor and Description | 
|---|---|
  | 
JHelpMask(int width,
         int height)
Create a new instance of JHelpMask 
 | 
private  | 
JHelpMask(int width,
         int height,
         byte[] data)
Create a new instance of JHelpMask 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()
clear the mask. 
 | 
void | 
drawCharacter(char character,
             java.lang.String family)
Use a character for mask 
 | 
void | 
fill(int x,
    int y)
Light on a pixel and all pixels of around, the filling is stopped by pixels already on 
 | 
int | 
getHeight()
Mask height 
 | 
boolean | 
getValue(int x,
        int y)
Indicates if a pixel in on 
 | 
int | 
getWidth()
Mask width 
 | 
static JHelpMask | 
load(java.io.InputStream inputStream)
Load the mask from a stream 
 | 
void | 
save(java.io.OutputStream outputStream)
Save the mask in a stream 
 | 
void | 
setValue(int x,
        int y,
        boolean value)
Change a pixel value 
 | 
private final byte[] data
private final int height
private final int width
private JHelpMask(int width,
         int height,
         byte[] data)
width - Mask widthheight - Mask heightdata - Mask datapublic JHelpMask(int width,
         int height)
width - Mask widthheight - Mask heightpublic static JHelpMask load(java.io.InputStream inputStream) throws java.io.IOException
inputStream - Stream to readjava.io.IOException - On reading issuepublic void clear()
public void drawCharacter(char character,
                 java.lang.String family)
character - Character to usefamily - Font family namepublic void fill(int x,
        int y)
x - X fill starty - Y fill startpublic int getHeight()
public boolean getValue(int x,
               int y)
x - Pixel xy - Pixel Ytrue if the pixel in onpublic int getWidth()
public void save(java.io.OutputStream outputStream)
          throws java.io.IOException
outputStream - Stream where write the maskjava.io.IOException - On writing issuepublic void setValue(int x,
            int y,
            boolean value)
x - Pixel Xy - Pixel Yvalue - true for light on, false for light off