protected void applyGradientToPaint(){
  if (Color.alpha(mSeriesItem.getSecondaryColor()) != 0) {
    int colorOne=mSeriesItem.getSpinClockwise() ? mSeriesItem.getColor() : mSeriesItem.getSecondaryColor();
    int colorTwo=mSeriesItem.getSpinClockwise() ? mSeriesItem.getSecondaryColor() : mSeriesItem.getColor();
    LinearGradient gradient=new LinearGradient(mBounds.left,mBounds.top,mBounds.right,mBounds.bottom,colorOne,colorTwo,Shader.TileMode.CLAMP);
    mPaint.setShader(gradient);
  }
}

protected void applyGradientToPaint ( ) { if ( Color . alpha ( mSeriesItem . getSecondaryColor ( ) ) != 0 ) { int colorOne = mSeriesItem . getSpinClockwise ( ) ? mSeriesItem . getColor ( ) : mSeriesItem . getSecondaryColor ( ) ; int colorTwo = mSeriesItem . getSpinClockwise ( ) ? mSeriesItem . getSecondaryColor ( ) : mSeriesItem . getColor ( ) ; LinearGradient gradient = new LinearGradient ( mBounds . left , mBounds . top , mBounds . right , mBounds . bottom , colorOne , colorTwo , Shader . TileMode . CLAMP ) ; mPaint . setShader ( gradient ) ; } }
build a gradient if required . this must be executed every time the bounds changed
