I want to do pixel level graphics on a PlayN game whose main target is HTML5. However, PlayN’s Canvas object does not provide access to the CanvasPixelArray class, or the putImageData and getImageData functions. I’m worried that using drawPoint for each pixel will be pretty slow; is there a better way of doing it?
I want to do pixel level graphics on a PlayN game whose main target
Share
There’s no pixel manipulation API for PlayN at the moment.
If you only want to target HTML5, you can use the GWT methods to create and manipulate ImageData objects and then inject those into PlayN via a mechanism I recently added for transforming images.
It’s a bit of a hack. At some point, I’ll add a mechanism for obtaining and manipulating pixel data for an image that is as fast as could be hoped for the backends that can support it.