code: public void clear() {
          // clean up existing bitmap
          if (bitmap != null) {
              bitmap.recycle();
          }
  
          // init bitmap cache
          bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
          canvas = new Canvas(bitmap);
  
          // notify listeners
          for (InkListener listener : listeners) {
              listener.onInkClear();
          }
  
          invalidate();
          isEmpty = true;
      }
docs: Clears the view