title: Emboss edges of a image shape showing the depth in android
body: <p>I want to show 3D embossed look and feel as shown in following image. I used EmbossMaskFilter but cannot get it to show the effect (see code below). Is there a  different way to do this? or how can I use the EmbossMaskFilter for this.</p>
  
  <p><strong>Required output</strong></p>
  
  <p><a href="https://i.stack.imgur.com/beBNx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/beBNx.png" alt="enter image description here"></a></p>
  
  <p><strong>My output</strong></p>
  
  <p><a href="https://i.stack.imgur.com/1w73P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1w73P.png" alt="enter image description here"></a></p>
  
  <pre><code>Path path2 = new Path();
  public Paint fillPaint = null;
  // called in constructor
  public void createPath()
  {
      //path 2 Big one
      araay = new Point[]{new Point(144,320),new Point(109,200), new Point(171,308),new Point(178,240),new Point(171,172),new Point(109,282),new Point(144,160)};
      AddBeziers(path2, araay, 320, 144);
      AddLine(path2, 216, 144 );
      AddLine(path2, 216, 216 );
      AddLine(path2, 144, 320);
  
       MaskFilter mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6,   3.5f);
      fillPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
      fillPaint.setColor(Color.WHITE);
      fillPaint.setFlags(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
      fillPaint.setAntiAlias(true);
      fillPaint.setDither(true);
      fillPaint.setStrokeJoin(Paint.Join.ROUND);
      fillPaint.setStrokeCap(Paint.Cap.ROUND);
      fillPaint.setStyle(Paint.Style.FILL);
      paint.setMaskFilter(mEmboss);   
  }
  
   // add lines to the path
  protected Path AddLine(Path path, int endX, int endY) {
      //path.moveTo(startX, startY);
  
      path.lineTo(endX, endY);
      return path;
  }
  
  // add curves to the path
  protected Path AddBeziers(Path path, Point[] points, int lastX, int lastY) {
  
      if (points[0].X != lastX &amp;&amp; points[0].Y != lastY)
          path.moveTo(points[0].X, points[0].Y);
  
      int index = 1;
  
      path.cubicTo(points[index].X, points[index].Y, points[index + 1].X,
          points[index + 1].Y, points[index + 2].X, points[index + 2].Y);
      index = index + 3;
      path.cubicTo(points[index].X, points[index].Y, points[index + 1].X,
          points[index + 1].Y, points[index + 2].X, points[index + 2].Y);
  
      return path;
  }
  
  //draw on canvas
  @Override
  public void onDraw(Canvas canvas) {
  
      canvas.drawPath(path2, fillPaint);
      super.onDraw(canvas);
  }
  </code></pre>