summaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'image.c')
-rw-r--r--image.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/image.c b/image.c
index 3410a0b..2267204 100644
--- a/image.c
+++ b/image.c
@@ -642,6 +642,26 @@ void img_rotate_right(img_t *img) {
img_rotate(img, 1);
}
+void img_flip(img_t *img, int f) {
+ if (img == NULL || img->im == NULL || img->win == NULL)
+ return;
+
+ imlib_context_set_image(img->im);
+ if (f == 0)
+ imlib_image_flip_horizontal();
+ else
+ imlib_image_flip_vertical();
+ img->dirty = true;
+}
+
+void img_flip_horizontal(img_t *img) {
+ img_flip(img, 0);
+}
+
+void img_flip_vertical(img_t *img) {
+ img_flip(img, 1);
+}
+
void img_toggle_antialias(img_t *img) {
if (img == NULL || img->im == NULL)
return;