public class PixelMask
extends java.lang.Object
BitSet but can be used
to keep track of coverage of a given region of 2-dimensional space.| Constructor | Description |
|---|---|
PixelMask(java.awt.Rectangle box) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
get(int x,
int y) |
Indicates whether a pixel at given point is set.
|
boolean |
get(java.awt.Point p) |
Indicates whether a pixel at given point is set.
|
void |
set(int x,
int y) |
Sets the pixel at the given coordinates.
|
void |
set(java.awt.Point p) |
Sets the pixel at the given coordinates.
|
void |
set(java.awt.Rectangle rect) |
Sets all the pixels in the given rectangle.
|
public PixelMask(java.awt.Rectangle box)
box - defines the boundary of the pixel mask regionpublic void set(java.awt.Rectangle rect)
rect - region to setpublic void set(java.awt.Point p)
p - coordinates of point to setpublic boolean get(java.awt.Point p)
p - coordinates of point to testpublic void set(int x,
int y)
x - X coordinate of point to sety - Y coordinate of point to setpublic boolean get(int x,
int y)
x - X coordinate of point to testy - Y coordinate of point to testCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.