apollo.gui.genomemap
Class PixelMask
java.lang.Object
apollo.gui.genomemap.PixelMask
- All Implemented Interfaces:
- PixelMaskI
public class PixelMask
- extends java.lang.Object
- implements PixelMaskI
Class which records which pixels in a tier have been drawn already, used in
drawing optimisation.
The yindex in these methods corresponds to a given "tier" that is being masked.
Separate masks are tracked for each tier.
|
Field Summary |
protected static org.apache.log4j.Logger |
logger
|
|
Constructor Summary |
PixelMask(int levels,
int size)
levels is the number of vertical levels/tiers
size is the maximum x coord |
|
Method Summary |
boolean |
isCompletelyObscured(int start,
int stop,
int yindex)
start and stop are for x coords,
yindex corresponds to vertical level
Returns true if the range of xcoords in the yindex level
is completely masked out |
void |
setPixelRangeState(int start,
int stop,
boolean state,
int yindex)
start and stop are for x coords, state is to set to toggle mask,
yindex corresponds to vertical level |
void |
setPixelState(int pix,
boolean state,
int yindex)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
protected static final org.apache.log4j.Logger logger
PixelMask
public PixelMask(int levels,
int size)
- levels is the number of vertical levels/tiers
size is the maximum x coord
setPixelState
public void setPixelState(int pix,
boolean state,
int yindex)
- Specified by:
setPixelState in interface PixelMaskI
setPixelRangeState
public void setPixelRangeState(int start,
int stop,
boolean state,
int yindex)
- start and stop are for x coords, state is to set to toggle mask,
yindex corresponds to vertical level
- Specified by:
setPixelRangeState in interface PixelMaskI
isCompletelyObscured
public boolean isCompletelyObscured(int start,
int stop,
int yindex)
- start and stop are for x coords,
yindex corresponds to vertical level
Returns true if the range of xcoords in the yindex level
is completely masked out
- Specified by:
isCompletelyObscured in interface PixelMaskI
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object