Package ij.process
Class PolygonFiller
java.lang.Object
ij.process.PolygonFiller
This class fills polygons using the scan-line filling algorithm
described at "http://www.cs.rit.edu/~icss571/filling/".
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a PolygonFiller.PolygonFiller
(int[] x, int[] y, int n) Constructs a PolygonFiller using the specified polygon. -
Method Summary
Modifier and TypeMethodDescriptionvoid
fill
(ImageProcessor ip, Rectangle r) Fills the polygon using the ImageProcessor's current drawing color.getMask
(int width, int height) Returns a byte mask containing a filled version of the polygon.void
setPolygon
(int[] x, int[] y, int n) Specifies the polygon to be filled.
-
Constructor Details
-
PolygonFiller
public PolygonFiller()Constructs a PolygonFiller. -
PolygonFiller
public PolygonFiller(int[] x, int[] y, int n) Constructs a PolygonFiller using the specified polygon.
-
-
Method Details
-
setPolygon
public void setPolygon(int[] x, int[] y, int n) Specifies the polygon to be filled. -
fill
Fills the polygon using the ImageProcessor's current drawing color. -
getMask
Returns a byte mask containing a filled version of the polygon.
-