title: Vertical LinearGradient with Android in Java
body: <p>Here is the code I use:</p>
  
  <pre><code>Shader mShader0 = new LinearGradient(10 , 0,  66 ,0, 
      new int[] { Color.RED, Color.GREEN, Color.BLUE },
      null, Shader.TileMode.REPEAT);  // CLAMP MIRROR REPEAT
  pincel1.setShader(mShader0);
  
  canvasG.drawRect(   0, 0,   30, 200, pincel1);
  canvasG.drawRect(1250, 0, 1280, 200, pincel1);
  canvasG.drawRect(1000, 0, 1030, 200, pincel1);
  canvasG.drawRect( 200, 0,  230, 200, pincel1);
  canvasG.drawRect( 250, 0,  280, 200, pincel1);
  
  pincel1.setShader(null); 
  </code></pre>
  
  <p>The result is that all the columns are different.</p>
  
  <p>Why are not all the same? What is wrong?</p>
  
  <p><img src="https://i.stack.imgur.com/4Faj1.png" alt="enter image description here"></p>