wrlib: move fixed angle rotation code to dedicated functions
commitf85066a19e7df9eb2771ee78aaf600612b14a93b
authorChristophe CURIS <christophe.curis@free.fr>
Fri, 4 Jul 2014 21:28:34 +0000 (4 23:28 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 6 Jul 2014 00:07:55 +0000 (6 01:07 +0100)
treee3394f3dbda96f1d5c56669cdf415b6945f39147
parentbe5d04525d3a2c7da0faf00b2ca1535b7e73a81d
wrlib: move fixed angle rotation code to dedicated functions

The function RRotateImage contains code to handle efficiently the 4 simple
angles 0, 90, 180 and 270 degrees, which makes it a long function.

This patch separate the code for the different cases into dedicated
functions so the main function's code ends up being simple (aka: easier to
understand/review/maintain).

As a side effect, the function for the 180 degree function is not static
because it can be reused to flip an image both horizontally and vertically.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wrlib/Makefile.am
wrlib/rotate.c
wrlib/rotate.h [new file with mode: 0644]