I'm currently working on a game in Java and am trying to create a background without using any image files. The image consists of a square split into 4 triangles, each of which is a different color.
If anyone could point me towards some was of using Graphics2D
and then saving it to a BufferedImage
, that would be great.
I recommend:
createGraphics()
method. drawXXX(...)
methods of which you have many to select from.setColor(Color c)
on your Graphics/Graphics2D object.dispose()
method.