Exemplo n.º 1
0
 public void setGradients(int i, int j) {
   textPaint.getTextBounds(text, 0, text.length(), gradientBounds);
   gradientBounds.sort();
   stroke.getPosTan(0.0F, points, null);
   textPaint.setShader(
       new LinearGradient(
           points[0],
           points[1] - bounds.height(),
           points[0],
           points[1],
           i,
           j,
           android.graphics.Shader.TileMode.CLAMP));
 }