PGraphics Transform Tool (Gist)

Having spent many hours flipping and rotating images, I decided to create a tool that might save some time. The TransformTool gist provides a class, ImageTransform, with methods that make it easy to do 90-degree rotations and reflections using a PGraphics. The sample code shows how you could do other rotations, too.

I’ve also been interested in the ways that PGraphics does and does not implement alpha channel transparency. The sample code creates an image file with transparency that may give an idea of the different results you can get with a call to the PGraphics.background(<color>) method.

I hope this proves useful.

peace,

Ignotus

1 Like