title: Drawing blur circle with canvas
body: <p>I want to make blur effect at the start of needle</p>
  
  <p><img src="https://i.stack.imgur.com/0cRRg.png" alt="enter image description here"></p>
  
  <p>For this i use <code>BlurMaskFilter</code>, but the blurry circle drawn on needle is almost invisible.</p>
  
  <p>To draw the needle i use:</p>
  
  <pre><code>    handPath = new Path();
      handPath.moveTo(0.5f, 0.5f);
      handPath.lineTo(0.5f - 0.010f, 0.5f);
      handPath.lineTo(0.5f - 0.010f, 0.5f - 0.32f);
      handPath.lineTo(0.5f + 0.010f, 0.5f - 0.32f);
      handPath.lineTo(0.5f + 0.010f, 0.5f);
      handPath.lineTo(0.5f, 0.5f);
      // Add blur effect
      handBlurPaint = new Paint();
      handBlurPaint.setColor(Color.BLACK);
      handBlurPaint.setMaskFilter(new BlurMaskFilter(8, Blur.NORMAL));
  </code></pre>
  
  <p>To draw the hand i use </p>
  
  <pre><code>        float handAngle = degreeToAngle(handPosition);
          canvas.save(Canvas.MATRIX_SAVE_FLAG);
          canvas.rotate(handAngle, 0.5f, 0.5f);
          canvas.drawPath(handPath, handPaint);
          canvas.restore();
          //Add blur effect           
          canvas.drawCircle(0.5f, 0.5f, 0.1f, handBlurPaint);
  </code></pre>
  
  <p>And the result</p>
  
  <p><img src="https://i.stack.imgur.com/4SDQQ.png" alt="enter image description here"></p>
  
  <p>I tried </p>
  
  <pre><code>.setMaskFilter(new BlurMaskFilter(8, Blur.NORMAL))
  </code></pre>
  
  <p>and</p>
  
  <pre><code>.setMaskFilter(new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL))
  </code></pre>
  
  <p>What should i do to achieve the effect?
  Thank you in advance.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Here in this <a href="http://about-android.blogspot.com/2010/07/2d-graphics-with-effects_11.html" rel="nofollow noreferrer">2D graphics with Effects</a> link, Blur filter is working.</p>
  
  <p><strong>Update2</strong></p>
  
  <p>Using <code>RadialGradient</code> i managed to do almost the same what i want. Thanks to @dwana</p>
  
  <pre><code>handBlurPaint.setShader(new RadialGradient(0.5f, 0.5f, 0.2f,Color.BLACK, Color.TRANSPARENT, TileMode.MIRROR));
  </code></pre>
  
  <p>and the result</p>
  
  <p><img src="https://i.stack.imgur.com/tD9eF.png" alt="enter image description here"></p>