Code example for Path

Methods: arcTocloselineTomoveTo

0
      float left = bounds.left;
      float top = bounds.top;
      float right = bounds.right - 1;
      float bottom = bounds.bottom - 1;
 
      Path path = new Path();
      path.moveTo(left, top);
      path.arcTo(new RectF(right - round * 2, top, right, top + round * 2), 270, 90);
      path.arcTo(new RectF(right - round * 2, bottom - round * 2, right, bottom), 0, 90);
      path.lineTo(left, bottom);
      path.close();
 
      return path;
    } 
  } 
 
  private static class ButtonDrawable extends BaseBackgroundDrawable { 
    private final PathFactory pathFactory;
    private final int topColor;
    private final int bottomColor;
    private final int shadowColor;