diff --git a/cucul/cucul.h b/cucul/cucul.h index c43acc1..d853ce7 100644 --- a/cucul/cucul.h +++ b/cucul/cucul.h @@ -120,9 +120,9 @@ int cucul_set_canvas_boundaries(cucul_canvas_t *, int, int, int cucul_invert(cucul_canvas_t *); int cucul_flip(cucul_canvas_t *); int cucul_flop(cucul_canvas_t *); -int cucul_rotate(cucul_canvas_t *); -int cucul_left(cucul_canvas_t *); -int cucul_right(cucul_canvas_t *); +int cucul_rotate_180(cucul_canvas_t *); +int cucul_rotate_left(cucul_canvas_t *); +int cucul_rotate_right(cucul_canvas_t *); /* @} */ /** \defgroup attributes libcucul attribute conversions @@ -288,6 +288,7 @@ char const * const * cucul_get_export_list(void); char const *) CUCUL_DEPRECATED; cucul_canvas_t * cucul_import_canvas(cucul_buffer_t *, char const *) CUCUL_DEPRECATED; + int cucul_rotate(cucul_canvas_t *) CUCUL_DEPRECATED; # define CUCUL_COLOR_BLACK CUCUL_BLACK # define CUCUL_COLOR_BLUE CUCUL_BLUE # define CUCUL_COLOR_GREEN CUCUL_GREEN diff --git a/cucul/legacy.c b/cucul/legacy.c index 9b293c9..78d63d9 100644 --- a/cucul/legacy.c +++ b/cucul/legacy.c @@ -209,3 +209,12 @@ int cucul_free_buffer(cucul_buffer_t *buf) return 0; } +/* + * Functions from transform.c + */ + +int cucul_rotate(cucul_canvas_t *cv) +{ + return cucul_rotate_180(cv); +} + diff --git a/cucul/transform.c b/cucul/transform.c index 051f9dc..0311b1b 100644 --- a/cucul/transform.c +++ b/cucul/transform.c @@ -173,7 +173,7 @@ int cucul_flop(cucul_canvas_t *cv) * \param cv The canvas to rotate. * \return This function always returns 0. */ -int cucul_rotate(cucul_canvas_t *cv) +int cucul_rotate_180(cucul_canvas_t *cv) { uint32_t *cbegin = cv->chars; uint32_t *cend = cbegin + cv->width * cv->height - 1; @@ -235,7 +235,7 @@ int cucul_rotate(cucul_canvas_t *cv) * \param cv The canvas to rotate left. * \return 0 in case of success, -1 if an error occurred. */ -int cucul_left(cucul_canvas_t *cv) +int cucul_rotate_left(cucul_canvas_t *cv) { uint32_t *newchars, *newattrs; unsigned int x, y; @@ -321,7 +321,7 @@ int cucul_left(cucul_canvas_t *cv) * \param cv The canvas to rotate right. * \return 0 in case of success, -1 if an error occurred. */ -int cucul_right(cucul_canvas_t *cv) +int cucul_rotate_right(cucul_canvas_t *cv) { uint32_t *newchars, *newattrs; unsigned int x, y; diff --git a/test/text.c b/test/text.c index 2fb93d7..ac13deb 100644 --- a/test/text.c +++ b/test/text.c @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) cucul_flop(pig); cucul_blit(cv, 0, cucul_get_canvas_height(pig), pig, NULL); cucul_flop(pig); - cucul_rotate(pig); + cucul_rotate_180(pig); cucul_blit(cv, cucul_get_canvas_width(pig), cucul_get_canvas_height(pig), pig, NULL); @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) fwrite(buffer, len, 1, stdout); free(buffer); - cucul_left(cv); + cucul_rotate_left(cv); buffer = cucul_export_memory(cv, "utf8", &len); fwrite(buffer, len, 1, stdout); free(buffer); diff --git a/test/transform.c b/test/transform.c index e941d0d..278567c 100644 --- a/test/transform.c +++ b/test/transform.c @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) cucul_put_str(cv, 0, 18, "rotate"); cucul_blit(tmp, 0, 0, image, NULL); - cucul_rotate(tmp); + cucul_rotate_180(tmp); cucul_blit(cv, 10, 18, tmp, NULL); caca_refresh_display(dp);