|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot.PixelMask
public class PixelMask
2-dimensional bit mask. Like a BitSet
but can be used
to keep track of coverage of a given region of 2-dimensional space.
Constructor Summary | |
---|---|
PixelMask(Rectangle box)
Constructor. |
Method Summary | |
---|---|
boolean |
get(int x,
int y)
Indicates whether a pixel at given point is set. |
boolean |
get(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(Point p)
Sets the pixel at the given coordinates. |
void |
set(Rectangle rect)
Sets all the pixels in the given rectangle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PixelMask(Rectangle box)
box
- defines the boundary of the pixel mask regionMethod Detail |
---|
public void set(Rectangle rect)
rect
- region to setpublic void set(Point p)
p
- coordinates of point to setpublic boolean get(Point p)
p
- coordinates of point to test
public 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 test
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |