docs: public static BufferedImage applyClippingPath(final Shape clip, final BufferedImage image, final BufferedImage destination) {
          notNull(clip, "clip");
          notNull(image, "image");
          isTrue(destination != null && destination != image, "destination may not be null or same instance as image");
  
          Graphics2D g = destination.createGraphics();
  
          try {
              AffineTransform originalTransform = g.getTransform();
  
              // Fill the clip shape, with antialias, scaled up to the image's size
              g.scale(image.getWidth(), image.getHeight());
              g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
              g.fill(clip);
  
              // Draw the image inside the clip shape
              g.setTransform(originalTransform);
              g.setComposite(AlphaComposite.SrcIn);
              g.drawImage(image, 0, 0, null);
          }
          finally {
              g.dispose();
          }
  
          return destination;
      }