public boolean contains(float x, float y) {
        int i;
        int j;
        boolean result = false;
        for (i = 0, j = points.size() - 1; i < points.size(); j = i++) {
            if ((points.get(i).y > y) != (points.get(j).y > y) &&
                    (x < (points.get(j).x - points.get(i).x) * (y - points.get(i).y) / (points.get(j).y-points.get(i).y) + points.get(i).x)) {
                result = !result;
            }
        }
        return result;
    }
Voronoi region allows to work with each diagram element

Created by quatja
vorolay/src/main/java/quatja/com/vorolay/diagram/VoronoiRegion.java