include/SDL_render.h
changeset 6320 6077a1310907
parent 6258 fce7ce72677b
child 6414 df50b0d6c1c3
--- a/include/SDL_render.h	Fri Jun 01 19:42:15 2012 -0300
+++ b/include/SDL_render.h	Fri Jun 01 19:51:08 2012 -0300
@@ -105,6 +105,16 @@
 } SDL_TextureModulate;
 
 /**
+ *  \brief Flip constants for SDL_RenderCopyEx
+ */
+typedef enum
+{
+    SDL_FLIP_NONE = 0x00000000,     /**< Do not flip */
+    SDL_FLIP_HORIZONTAL = 0x00000001,    /**< flip horizontally */
+    SDL_FLIP_VERTICAL = 0x00000002     /**< flip vertically */
+} SDL_RendererFlip;
+
+/**
  *  \brief A structure representing rendering state
  */
 struct SDL_Renderer;
@@ -599,6 +609,27 @@
                                            const SDL_Rect * srcrect,
                                            const SDL_Rect * dstrect);
 
+/**
+ *  \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center 
+ *
+ *  \param texture The source texture.
+ *  \param srcrect   A pointer to the source rectangle, or NULL for the entire
+ *                   texture.
+ *  \param dstrect   A pointer to the destination rectangle, or NULL for the
+ *                   entire rendering target.
+ *  \param angle    An angle in degrees that indicates the rotation that will be applied to dstrect
+ *  \param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2)
+ *  \param flip     A SFL_Flip value stating which flipping actions should be performed on the texture
+ * 
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
+                                           SDL_Texture * texture,
+                                           const SDL_Rect * srcrect,
+                                           const SDL_Rect * dstrect,
+                                           const double angle,
+                                           const SDL_Point *center,
+                                           const SDL_RendererFlip flip);
 
 /**
  *  \brief Read pixels from the current rendering target.