Class FillPixer
java.lang.Object
uk.ac.starlink.ttools.plot2.layer.FillPixer
- All Implemented Interfaces:
Pixer
Pixer that iterates over all points inside a polygon.
Should handle all polygons (convex, concave, re-entrant).
I think(?) the algorithm is about as efficient as it's going to get
for a single-threaded implementation. Memory consumption is low.
- Since:
- 6 Oct 2021
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FillPixer
Constructor.- Parameters:
xs
- np-element array giving graphics X vertex coordinatesys
- np-element array giving graphics Y vertex coordinatesnp
- number of verticesbounds
- actual bounds within which pixels are required, or null for all pixels
-
-
Method Details
-
next
public boolean next()Description copied from interface:Pixer
Advances to the next point to be dispensed by this iterator. Must be called before any calls to getX/getY. -
getX
public int getX()Description copied from interface:Pixer
Returns the X coordinate of the current point. -
getY
public int getY()Description copied from interface:Pixer
Returns the Y coordinate of the current point.
-