@Override
    protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
        Integer index = (Integer) child.getTag();
        VoronoiRegion region = mRegions.get(index);

        // firstly clip and draw children
        canvas.clipPath(region.path, Region.Op.REPLACE);
        boolean result = super.drawChild(canvas, child, drawingTime);

        // then draw borders
        if (mBorderEnabled)
            canvas.drawPath(region.path, p);

        // draw site
//        canvas.drawCircle((float)region.site.x, (float)region.site.y, 10, p);

        return result;
    }
Set layer-type HARDWARE or SOFTWARE for the view (true/false).

@param enabled True if should be hardware acceleration, false if should be software
vorolay/src/main/java/quatja/com/vorolay/VoronoiView.java