private void init(AttributeSet attrs) {
        TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.VoronoiView, 0, 0);
        mBorderEnabled = a.getBoolean(R.styleable.VoronoiView_show_border, DEF_BORDERS);
        mBorderColor = a.getColor(R.styleable.VoronoiView_border_color, DEF_BORDERS_COLOR);
        mBorderWidth = a.getFloat(R.styleable.VoronoiView_border_width, DEF_BORDER_WIDTH);
        mRoundCornersEnabled = a.getBoolean(R.styleable.VoronoiView_border_round, DEF_BORDER_CORNERS_ROUND);
        mGenerationType = a.getInt(R.styleable.VoronoiView_generation_type, DEF_GENERATION_TYPE);
        a.recycle();

        initPaint();
        initDiagram();
    }
Callback method to be invoked when a region in this VoronoiView has
been clicked.

@param view     The region view which was clicked
@param position The position of the region
vorolay/src/main/java/quatja/com/vorolay/VoronoiView.java