Package ij.gui
Class Line.PointIterator
- java.lang.Object
-
- ij.gui.Line.PointIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.awt.Point>
- Enclosing class:
- Line
public static class Line.PointIterator extends java.lang.Object implements java.util.Iterator<java.awt.Point>Dedicated point iterator for thin lines. The iterator is based on (an improved version of) the algorithm used by the original methodImageProcessor.getLine(double, double, double, double). Improvements are (a) that the endpoint is drawn too and (b) every line point is visited only once, duplicates are skipped. Author: Wilhelm Burger (04/2017)
-
-
Constructor Summary
Constructors Constructor Description PointIterator(double x1, double y1, double x2, double y2)PointIterator(Line line)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()java.awt.Pointnext()voidremove()
-
-
-
Constructor Detail
-
PointIterator
public PointIterator(Line line)
-
PointIterator
public PointIterator(double x1, double y1, double x2, double y2)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<java.awt.Point>
-
next
public java.awt.Point next()
- Specified by:
nextin interfacejava.util.Iterator<java.awt.Point>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<java.awt.Point>
-
-