code: public static Bitmap renderPath(Path path) {
      RectF bounds = new RectF();
      path.computeBounds(bounds, false);
      Bitmap bitmap = Bitmap.createBitmap((int) bounds.right, (int) bounds.bottom, Bitmap.Config.ARGB_8888);
      Canvas canvas = new Canvas(bitmap);
      Paint paint = new LPaint();
      paint.setAntiAlias(true);
      paint.setColor(Color.BLUE);
      canvas.drawPath(path, paint);
      return bitmap;
    }
docs: For testing purposes only. DO NOT USE IN PRODUCTION.