Changeset 1831


Ignore:
Timestamp:
Sep 30, 2007 5:45:42 PM (7 years ago)
Author:
sam
Message:
  • Added left and right filters for 90-degree rotations.
  • Bumped libcucul versioned dependency accordingly.
Location:
toilet/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • toilet/trunk/configure.ac

    r1442 r1831  
    5252 
    5353CUCUL="no" 
    54 PKG_CHECK_MODULES(CUCUL, cucul >= 0.99.beta10, 
     54PKG_CHECK_MODULES(CUCUL, cucul >= 0.99.beta12, 
    5555 [CUCUL="yes"], 
    5656 [AC_MSG_RESULT(no) 
    57   AC_MSG_ERROR([you need libcucul version 0.99.beta10 or later])]) 
     57  AC_MSG_ERROR([you need libcucul version 0.99.beta12 or later])]) 
    5858 
    5959AC_MSG_CHECKING([for release date]) 
  • toilet/trunk/src/filter.c

    r1461 r1831  
    3535static void filter_flip(context_t *); 
    3636static void filter_flop(context_t *); 
    37 static void filter_rotate(context_t *); 
     37static void filter_180(context_t *); 
     38static void filter_left(context_t *); 
     39static void filter_right(context_t *); 
    3840 
    3941struct 
     
    5052    { "flip", filter_flip, "flip horizontally" }, 
    5153    { "flop", filter_flop, "flip vertically" }, 
    52     { "rotate", filter_rotate, "perform a 180 degrees rotation" }, 
     54    { "rotate", filter_180, NULL }, /* backwards compatibility */ 
     55    { "180", filter_180, "rotate 180 degrees" }, 
     56    { "left", filter_left, "rotate 90 degrees counterclockwise" }, 
     57    { "right", filter_right, "rotate 90 degrees clockwise" }, 
    5358}; 
    5459 
     
    5964    printf("Available filters:\n"); 
    6065    for(i = 0; i < sizeof(lookup) / sizeof(lookup[0]); i++) 
    61         printf("\"%s\": %s\n", lookup[i].name, lookup[i].description); 
     66        if(lookup[i].description) 
     67            printf("\"%s\": %s\n", lookup[i].name, lookup[i].description); 
    6268 
    6369    return 0; 
     
    216222} 
    217223 
    218 static void filter_rotate(context_t *cx) 
    219 { 
    220     cucul_rotate(cx->torender); 
    221 } 
    222  
     224static void filter_180(context_t *cx) 
     225{ 
     226    cucul_rotate_180(cx->torender); 
     227} 
     228 
     229static void filter_left(context_t *cx) 
     230{ 
     231    cucul_rotate_left(cx->torender); 
     232} 
     233 
     234static void filter_right(context_t *cx) 
     235{ 
     236    cucul_rotate_right(cx->torender); 
     237} 
     238 
Note: See TracChangeset for help on using the changeset viewer.