Code example for Path

Methods: addArc

0
        // calculate rectangle for drawArc calls 
        int pLeft = getPaddingLeft();
        mRectLeft = new RectF(pLeft + strokeWidth / 2.0f, 0 + strokeWidth / 2.0f, mCircleSize
                - strokeWidth / 2.0f + pLeft, mCircleSize - strokeWidth / 2.0f);
 
        mTextArc = new Path();
        mTextArc.addArc(mRectLeft, 180, 180);
        mPaintText.setTextSize(strokeWidth);
        mArcOffset = (strokeWidth - levelStrokeWidth);
 
        // force new measurement for wrap-content xml tag 
        onMeasure(0, 0); 
    } 
 
    private void initSizeMeasureIconHeight() { 
        mCircleSize = Math.min(getWidth(), getHeight());
    } 
}