I know how to fill a rectangle in Swing with solid color:
Graphics2D g2d = bi.createGraphics(); g2d.setColor(Color.RED); g2d.fillRect(0,0,100,100);
I know how to fill it with an image:
BufferedImage bi; Graphics2D g2d = bi.createGraphics(); g2d.setPaint (new Color(r, g, b)); g2d.fillRect (0, 0, bi.getWidth(), bi.getHeight());
But how to fill a 950x950 rectangle with a 100x100 tile pattern?
(image image should be used 100 times)
Edward ruchevits
source share