mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 03:50:30 +01:00
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>
31 lines
881 B
C
31 lines
881 B
C
/*
|
|
* Raster graphics library
|
|
*
|
|
* Copyright (c) 2014 Window Maker Team
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library.
|
|
*/
|
|
|
|
#ifndef WRASTER_ROTATE_H
|
|
#define WRASTER_ROTATE_H
|
|
|
|
|
|
/*
|
|
* Returns a new image, rotated by 180 degrees
|
|
*/
|
|
RImage *wraster_rotate_image_180(RImage *source);
|
|
|
|
|
|
#endif
|