* Added left and right filters for 90-degree rotations.

* Bumped libcucul versioned dependency accordingly.
This commit is contained in:
Sam Hocevar 2007-09-30 15:45:42 +00:00 committed by sam
parent 43b9df4ff1
commit 4f409dd091
2 changed files with 23 additions and 7 deletions

View file

@ -51,10 +51,10 @@ if test "${ac_cv_have_tiocgwinsz}" = "yes"; then
fi
CUCUL="no"
PKG_CHECK_MODULES(CUCUL, cucul >= 0.99.beta10,
PKG_CHECK_MODULES(CUCUL, cucul >= 0.99.beta12,
[CUCUL="yes"],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([you need libcucul version 0.99.beta10 or later])])
AC_MSG_ERROR([you need libcucul version 0.99.beta12 or later])])
AC_MSG_CHECKING([for release date])
stamp="$(sed -ne 's/# \$Id: .*\(....-..-..\).*/\1/p;q' configure.ac)"

View file

@ -34,7 +34,9 @@ static void filter_gay(context_t *);
static void filter_metal(context_t *);
static void filter_flip(context_t *);
static void filter_flop(context_t *);
static void filter_rotate(context_t *);
static void filter_180(context_t *);
static void filter_left(context_t *);
static void filter_right(context_t *);
struct
{
@ -49,7 +51,10 @@ const lookup[] =
{ "metal", filter_metal, "add a metallic colour effect" },
{ "flip", filter_flip, "flip horizontally" },
{ "flop", filter_flop, "flip vertically" },
{ "rotate", filter_rotate, "perform a 180 degrees rotation" },
{ "rotate", filter_180, NULL }, /* backwards compatibility */
{ "180", filter_180, "rotate 180 degrees" },
{ "left", filter_left, "rotate 90 degrees counterclockwise" },
{ "right", filter_right, "rotate 90 degrees clockwise" },
};
int filter_list(void)
@ -58,7 +63,8 @@ int filter_list(void)
printf("Available filters:\n");
for(i = 0; i < sizeof(lookup) / sizeof(lookup[0]); i++)
printf("\"%s\": %s\n", lookup[i].name, lookup[i].description);
if(lookup[i].description)
printf("\"%s\": %s\n", lookup[i].name, lookup[i].description);
return 0;
}
@ -215,8 +221,18 @@ static void filter_flop(context_t *cx)
cucul_flop(cx->torender);
}
static void filter_rotate(context_t *cx)
static void filter_180(context_t *cx)
{
cucul_rotate(cx->torender);
cucul_rotate_180(cx->torender);
}
static void filter_left(context_t *cx)
{
cucul_rotate_left(cx->torender);
}
static void filter_right(context_t *cx)
{
cucul_rotate_right(cx->torender);
}