Interface Pixellator

All Known Implementing Classes:
BitSetPixellator, Drawing, PointArrayPixellator, TranslatedPixellator

public interface Pixellator
Reusable iterator over pixel positions. Implementations will not in general be thread-safe.
Since:
28 Mar 2007
Author:
Mark Taylor
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of the bounding rectangle for this pixellator.
    int
    Returns the X value for the current point.
    int
    Returns the Y value for the current point.
    boolean
    Moves to the next point in the sequence.
    void
    Makes this object ready to iterate.
  • Method Details

    • getBounds

      Rectangle getBounds()
      Returns a copy of the bounding rectangle for this pixellator. All points iterated over by this object will fall within this rectangle. If this object has no points, null may be returned.
      Returns:
      bounds
    • start

      void start()
      Makes this object ready to iterate. Should be called before any call to next().
    • next

      boolean next()
      Moves to the next point in the sequence. Must be called before any call to getX()/getY(). Returns value indicates whether there is a next point.
      Returns:
      next true iff there are more points
    • getX

      int getX()
      Returns the X value for the current point.
      Returns:
      x
    • getY

      int getY()
      Returns the Y value for the current point.
      Returns:
      y