summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorbaskerville <nihilhill@gmail.com>2012-05-06 09:39:45 +0200
committerbaskerville <nihilhill@gmail.com>2012-05-06 09:39:45 +0200
commitba0a5b89fa1e9147c60ddb8bbc2b1bcbe2995cd8 (patch)
treede37696ccd939fb4df934483b39f5e30071ab341 /commands.c
parent56b6d23c0cb05973415bdd2c66af26e8f7db2539 (diff)
downloadnsxiv-ba0a5b89fa1e9147c60ddb8bbc2b1bcbe2995cd8.tar.zst
Added horizontal and vertical flip commands
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/commands.c b/commands.c
index c7c817f..92d5ca7 100644
--- a/commands.c
+++ b/commands.c
@@ -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);