add head endpoint and finish the body renderer

This commit is contained in:
Lee
2024-04-11 06:10:37 +01:00
parent 1a74b0099b
commit f63d1cc3ec
8 changed files with 230 additions and 64 deletions

@ -24,4 +24,18 @@ public class ImageUtils {
graphics.dispose();
return scaled;
}
/**
* Flip an image.
*
* @param src the source image
* @return the flipped image
*/
public static BufferedImage flip(@NotNull final BufferedImage src) {
BufferedImage flipped = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = flipped.createGraphics();
graphics.drawImage(src, src.getWidth(), 0, 0, src.getHeight(), 0, 0, src.getWidth(), src.getHeight(), null);
graphics.dispose();
return flipped;
}
}