docs: private void generatePatternBitmap() {
      if (getBounds().width() <= 0 || getBounds().height() <= 0) {
        return;
      }
  
      bitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888);
      Canvas canvas = new Canvas(bitmap);
  
      Rect r = new Rect();
      boolean verticalStartWhite = true;
      for (int i = 0; i <= numRectanglesVertical; i++) {
        boolean isWhite = verticalStartWhite;
        for (int j = 0; j <= numRectanglesHorizontal; j++) {
          r.top = i * rectangleSize;
          r.left = j * rectangleSize;
          r.bottom = r.top + rectangleSize;
          r.right = r.left + rectangleSize;
          canvas.drawRect(r, isWhite ? paintWhite : paintGray);
          isWhite = !isWhite;
        }
        verticalStartWhite = !verticalStartWhite;
      }
    }