summaryrefslogtreecommitdiff
path: root/sdl_zoom.h
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2009-06-24 11:58:25 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 08:52:44 -0500
commitc18a2c360e3100bbd71162cf922dcd8c429a8b71 (patch)
treedea997d9de9b100224a2f2adf25dead03d47df34 /sdl_zoom.h
parent14899cdf3a6e1fc0d72097a43c1c53a1354fbfbf (diff)
downloadqemu-c18a2c360e3100bbd71162cf922dcd8c429a8b71.tar.gz
sdl zooming
Hi all, this patch implements zooming capabilities for the sdl interface. A new sdl_zoom_blit function is added that is able to scale and blit a portion of a surface into another. This way we can enable SDL_RESIZABLE and have a real_screen surface with a different size than the guest surface and let sdl_zoom_blit take care of the problem. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'sdl_zoom.h')
-rw-r--r--sdl_zoom.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/sdl_zoom.h b/sdl_zoom.h
new file mode 100644
index 0000000000..33dc63408b
--- /dev/null
+++ b/sdl_zoom.h
@@ -0,0 +1,25 @@
+/*
+ * SDL_zoom - surface scaling
+ *
+ * Copyright (c) 2009 Citrix Systems, Inc.
+ *
+ * Derived from: SDL_rotozoom, LGPL (c) A. Schiffler from the SDL_gfx library.
+ * Modifications by Stefano Stabellini.
+ *
+ * This work is licensed under the terms of the GNU GPL version 2.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef _SDL_zoom_h
+#define _SDL_zoom_h
+
+#include <SDL/SDL.h>
+
+#define SMOOTHING_OFF 0
+#define SMOOTHING_ON 1
+
+int sdl_zoom_blit(SDL_Surface *src_sfc, SDL_Surface *dst_sfc,
+ int smooth, SDL_Rect *src_rect);
+
+#endif /* _SDL_zoom_h */