diff options
author | baskerville <nihilhill@gmail.com> | 2012-05-06 09:39:45 +0200 |
---|---|---|
committer | baskerville <nihilhill@gmail.com> | 2012-05-06 09:39:45 +0200 |
commit | ba0a5b89fa1e9147c60ddb8bbc2b1bcbe2995cd8 (patch) | |
tree | de37696ccd939fb4df934483b39f5e30071ab341 /commands.c | |
parent | 56b6d23c0cb05973415bdd2c66af26e8f7db2539 (diff) | |
download | nsxiv-ba0a5b89fa1e9147c60ddb8bbc2b1bcbe2995cd8.tar.zst |
Added horizontal and vertical flip commands
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -342,6 +342,21 @@ bool i_rotate(arg_t a) { return false; } +bool i_flip(arg_t a) { + flip_t flp = (flip_t) a; + + if (mode == MODE_IMAGE) { + if (flp == FLIP_HORIZONTAL) { + img_flip_horizontal(&img); + return true; + } else if (flp == FLIP_VERTICAL) { + img_flip_vertical(&img); + return true; + } + } + return false; +} + bool i_toggle_antialias(arg_t a) { if (mode == MODE_IMAGE) { img_toggle_antialias(&img); |