PlayN - Draw on an Image

408 views Asked by At

I have recently started using PlayN for a hobby project and has now stumbled upon a problem.

I would like to draw some lines and text onto an Image and save this image for later use. In Java I would just make a BufferedImage and use its graphicsBuffered to draw upon, but I can not find any similar solution in PlayN.

Is this at all possible, and if so how ?

I somehow need to be able to convert a BufferedImage to an Image and the other way around.

1

There are 1 answers

2
samskivert On BEST ANSWER

Create a CanvasImage, draw your image onto the CanvasImage, and then draw your text and lines on top of it. You can then use the CanvasImage in an ImageLayer to put it into your scene graph.