ij.process
Class FloatPolygon

java.lang.Object
  extended by ij.process.FloatPolygon

public class FloatPolygon
extends java.lang.Object

Used by the Roi classes to return float coordinate arrays and to determine if a point is inside or outside of spline fitted selections.


Field Summary
 int npoints
          The number of points.
 float[] xpoints
           
 float[] ypoints
           
 
Constructor Summary
FloatPolygon(float[] xpoints, float[] ypoints, int npoints)
          Constructs a FloatPolygon.
 
Method Summary
 boolean contains(float x, float y)
          Returns 'true' if the point (x,y) is inside this polygon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

npoints

public int npoints
The number of points.


xpoints

public float[] xpoints

ypoints

public float[] ypoints
Constructor Detail

FloatPolygon

public FloatPolygon(float[] xpoints,
                    float[] ypoints,
                    int npoints)
Constructs a FloatPolygon.

Method Detail

contains

public boolean contains(float x,
                        float y)
Returns 'true' if the point (x,y) is inside this polygon. This is a Java version of the remarkably small C program by W. Randolph Franklin at http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html#The%20C%20Code