It is necessary to draw in a large image (at the moment it is a BufferedImage ) small at certain coordinates. How is this done (a method for drawing inside, for example)? If you need another class of images / graphics - no problem
1 answer
Strange, it seems, it would not take long to search!
BufferedImage img = new BufferedImage(1000, 1000, BufferedImage.TYPE_INT_RGB); BufferedImage smallerImage = ...; img.getGraphics().drawImage(smallerImage, 100, 100, null); after that, the smallerImage should appear in the image img , shifted 100 pixels to the right and 100 pixels down
- Forever grateful! Separately I met and tried both getGraphics () and drawImage (), but the result is clear - SpartanzNeverDie
|