|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot.PointIterator
public abstract class PointIterator
Iterates over the points which have actually been plotted to the screen.
Field Summary | |
---|---|
static PointIterator |
EMPTY
PointIterator instance with no points. |
Constructor Summary | |
---|---|
PointIterator()
|
Method Summary | |
---|---|
BitSet |
getAllPoints()
Returns a bit vector with bits set for every point index visited by this iterator. |
int |
getClosestPoint(Point p,
int error)
Returns the index of the closest plotted point to a given screen point. |
BitSet |
getContainedPoints(Shape shape)
Returns a bit vector with bits set for every point index which falls within a given shape on the screen. |
int |
getIndex()
Returns the most recently read point index. |
int |
getX()
Returns the most recently read screen X coordinate. |
int |
getY()
Returns the most recently read Y coordinate. |
protected abstract int[] |
nextPoint()
Returns a triple giving point index, screen X coordinate and screen Y coordinate. |
boolean |
readNextPoint()
Loads the data for the next point if there is one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static PointIterator EMPTY
Constructor Detail |
---|
public PointIterator()
Method Detail |
---|
protected abstract int[] nextPoint()
int[]
array with different contents each time.
Invoked by readNextPoint()
.
public int getIndex()
public int getX()
public int getY()
public boolean readNextPoint()
public BitSet getContainedPoints(Shape shape)
shape
- shape defining inclusion criterion
public BitSet getAllPoints()
public int getClosestPoint(Point p, int error)
p
- screen point near which plotted points should be locatederror
- number of pixels in any direction which defines the
error box within which a point may be found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |