From ba0a5b89fa1e9147c60ddb8bbc2b1bcbe2995cd8 Mon Sep 17 00:00:00 2001 From: baskerville Date: Sun, 6 May 2012 09:39:45 +0200 Subject: Added horizontal and vertical flip commands --- commands.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'commands.c') 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); -- cgit v1.2.3