+-------+ +-------+ | | |\ \ | OLD | | \ NEW \ | | |an\ \ +-------+ |gle+-------+
If the angle is negative, it shears the other way:
+-------+ |-an+-------+ | | |gl/ / | OLD | |e/ NEW / | | |/ / +-------+ +-------+
The angle should not get too close to 90 or -90, or the resulting pixmap will be unreasonably wide.
The shearing is implemented by looping over the source pixels and distributing fractions to each of the destination pixels.
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.