private void drawTextElements(Canvas canvas,float textSize,Typeface typeface,ColorStateList textColor,String[] texts,float[] textX,float[] textY,Paint paint,int alpha,boolean showActivated,int activatedDegrees,boolean activatedOnly){
  paint.setTextSize(textSize);
  paint.setTypeface(typeface);
  final float activatedIndex=activatedDegrees / (360.0f / NUM_POSITIONS);
  final int activatedFloor=(int)activatedIndex;
  final int activatedCeil=((int)Math.ceil(activatedIndex)) % NUM_POSITIONS;
  for (int i=0; i < 12; i++) {
    final boolean activated=(activatedFloor == i || activatedCeil == i);
    if (activatedOnly && !activated) {
      continue;
    }
    final int stateMask=SUtils.STATE_ENABLED | (showActivated && activated ? SUtils.STATE_ACTIVATED : 0);
    final int color=textColor.getColorForState(SUtils.resolveStateSet(stateMask),0);
    paint.setColor(color);
    paint.setAlpha(getMultipliedAlpha(color,alpha));
    canvas.drawText(texts[i],textX[i],textY[i],paint);
  }
}

private void drawTextElements ( Canvas canvas , float textSize , Typeface typeface , ColorStateList textColor , String [ ] texts , float [ ] textX , float [ ] textY , Paint paint , int alpha , boolean showActivated , int activatedDegrees , boolean activatedOnly ) { paint . setTextSize ( textSize ) ; paint . setTypeface ( typeface ) ; final float activatedIndex = activatedDegrees / ( 360.0f / NUM_POSITIONS ) ; final int activatedFloor = ( int ) activatedIndex ; final int activatedCeil = ( ( int ) Math . ceil ( activatedIndex ) ) % NUM_POSITIONS ; for ( int i = 0 ; i < 12 ; i ++ ) { final boolean activated = ( activatedFloor == i || activatedCeil == i ) ; if ( activatedOnly && ! activated ) { continue ; } final int stateMask = SUtils . STATE_ENABLED | ( showActivated && activated ? SUtils . STATE_ACTIVATED : 0 ) ; final int color = textColor . getColorForState ( SUtils . resolveStateSet ( stateMask ) , 0 ) ; paint . setColor ( color ) ; paint . setAlpha ( getMultipliedAlpha ( color , alpha ) ) ; canvas . drawText ( texts [ i ] , textX [ i ] , textY [ i ] , paint ) ; } }
draw the 12 text values at the positions specified by the textgrid parameters .
