diff options
author | Sam Lantinga <slouken@libsdl.org> | 2013-05-18 14:17:52 -0700 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2013-05-18 14:17:52 -0700 |
commit | b80d20fb1100c64799769dbc0ef67582dcf29e31 (patch) | |
tree | 351258ecef703d638c01d1e629af4adc22a31994 /include/SDL_render.h | |
parent | 220d178aad1719aabbf6e2dd0bebcedba0abc951 (diff) | |
download | sdl-b80d20fb1100c64799769dbc0ef67582dcf29e31.tar.gz |
File style cleanup for the SDL 2.0 release
Diffstat (limited to 'include/SDL_render.h')
-rw-r--r-- | include/SDL_render.h | 224 |
1 files changed, 110 insertions, 114 deletions
diff --git a/include/SDL_render.h b/include/SDL_render.h index 8ec365a85..aa92559a3 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -21,7 +21,7 @@ /** * \file SDL_render.h - * + * * Header file for SDL 2D rendering functions. * * This API supports the following features: @@ -52,9 +52,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -62,10 +60,10 @@ extern "C" { */ typedef enum { - SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */ - SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware + SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */ + SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware acceleration */ - SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized + SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized with the refresh rate */ SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports rendering to texture */ @@ -130,28 +128,28 @@ typedef struct SDL_Texture SDL_Texture; /* Function prototypes */ /** - * \brief Get the number of 2D rendering drivers available for the current + * \brief Get the number of 2D rendering drivers available for the current * display. - * + * * A render driver is a set of code that handles rendering and texture * management on a particular display. Normally there is only one, but * some drivers may have several available with different capabilities. - * + * * \sa SDL_GetRenderDriverInfo() * \sa SDL_CreateRenderer() */ extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void); /** - * \brief Get information about a specific 2D rendering driver for the current + * \brief Get information about a specific 2D rendering driver for the current * display. - * + * * \param index The index of the driver to query information about. - * \param info A pointer to an SDL_RendererInfo struct to be filled with + * \param info A pointer to an SDL_RendererInfo struct to be filled with * information on the rendering driver. - * + * * \return 0 on success, -1 if the index was out of range. - * + * * \sa SDL_CreateRenderer() */ extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index, @@ -175,14 +173,14 @@ extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer( /** * \brief Create a 2D rendering context for a window. - * + * * \param window The window where rendering is displayed. - * \param index The index of the rendering driver to initialize, or -1 to + * \param index The index of the rendering driver to initialize, or -1 to * initialize the first one supporting the requested flags. * \param flags ::SDL_RendererFlags. - * + * * \return A valid rendering context or NULL if there was an error. - * + * * \sa SDL_CreateSoftwareRenderer() * \sa SDL_GetRendererInfo() * \sa SDL_DestroyRenderer() @@ -192,11 +190,11 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window, /** * \brief Create a 2D software rendering context for a surface. - * + * * \param surface The surface where rendering is done. - * + * * \return A valid rendering context or NULL if there was an error. - * + * * \sa SDL_CreateRenderer() * \sa SDL_DestroyRenderer() */ @@ -215,17 +213,17 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer, /** * \brief Create a texture for a rendering context. - * + * * \param renderer The renderer. * \param format The format of the texture. * \param access One of the enumerated values in ::SDL_TextureAccess. * \param w The width of the texture in pixels. * \param h The height of the texture in pixels. - * - * \return The created texture is returned, or 0 if no rendering context was + * + * \return The created texture is returned, or 0 if no rendering context was * active, the format was unsupported, or the width or height were out * of range. - * + * * \sa SDL_QueryTexture() * \sa SDL_UpdateTexture() * \sa SDL_DestroyTexture() @@ -237,14 +235,14 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, /** * \brief Create a texture from an existing surface. - * + * * \param renderer The renderer. * \param surface The surface containing pixel data used to fill the texture. - * + * * \return The created texture is returned, or 0 on error. - * + * * \note The surface is not modified or freed by this function. - * + * * \sa SDL_QueryTexture() * \sa SDL_DestroyTexture() */ @@ -252,15 +250,15 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer /** * \brief Query the attributes of a texture - * + * * \param texture A texture to be queried. - * \param format A pointer filled in with the raw format of the texture. The - * actual format may differ, but pixel transfers will use this + * \param format A pointer filled in with the raw format of the texture. The + * actual format may differ, but pixel transfers will use this * format. * \param access A pointer filled in with the actual access to the texture. * \param w A pointer filled in with the width of the texture in pixels. * \param h A pointer filled in with the height of the texture in pixels. - * + * * \return 0 on success, or -1 if the texture is not valid. */ extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, @@ -269,15 +267,15 @@ extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, /** * \brief Set an additional color value used in render copy operations. - * + * * \param texture The texture to update. * \param r The red color value multiplied into copy operations. * \param g The green color value multiplied into copy operations. * \param b The blue color value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or color modulation + * + * \return 0 on success, or -1 if the texture is not valid or color modulation * is not supported. - * + * * \sa SDL_GetTextureColorMod() */ extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, @@ -286,14 +284,14 @@ extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, /** * \brief Get the additional color value used in render copy operations. - * + * * \param texture The texture to query. * \param r A pointer filled in with the current red color value. * \param g A pointer filled in with the current green color value. * \param b A pointer filled in with the current blue color value. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \sa SDL_SetTextureColorMod() */ extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, @@ -302,13 +300,13 @@ extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, /** * \brief Set an additional alpha value used in render copy operations. - * + * * \param texture The texture to update. * \param alpha The alpha value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or alpha modulation + * + * \return 0 on success, or -1 if the texture is not valid or alpha modulation * is not supported. - * + * * \sa SDL_GetTextureAlphaMod() */ extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, @@ -316,12 +314,12 @@ extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, /** * \brief Get the additional alpha value used in render copy operations. - * + * * \param texture The texture to query. * \param alpha A pointer filled in with the current alpha value. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \sa SDL_SetTextureAlphaMod() */ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, @@ -329,16 +327,16 @@ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, /** * \brief Set the blend mode used for texture copy operations. - * + * * \param texture The texture to update. * \param blendMode ::SDL_BlendMode to use for texture blending. - * + * * \return 0 on success, or -1 if the texture is not valid or the blend mode is * not supported. - * + * * \note If the blend mode is not supported, the closest supported mode is * chosen. - * + * * \sa SDL_GetTextureBlendMode() */ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, @@ -346,12 +344,12 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, /** * \brief Get the blend mode used for texture copy operations. - * + * * \param texture The texture to query. * \param blendMode A pointer filled in with the current blend mode. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \sa SDL_SetTextureBlendMode() */ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, @@ -359,15 +357,15 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, /** * \brief Update the given texture rectangle with new pixel data. - * + * * \param texture The texture to update - * \param rect A pointer to the rectangle of pixels to update, or NULL to + * \param rect A pointer to the rectangle of pixels to update, or NULL to * update the entire texture. * \param pixels The raw pixel data. * \param pitch The number of bytes between rows of pixel data. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \note This is a fairly slow function. */ extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture, @@ -376,17 +374,17 @@ extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture, /** * \brief Lock a portion of the texture for write-only pixel access. - * - * \param texture The texture to lock for access, which was created with + * + * \param texture The texture to lock for access, which was created with * ::SDL_TEXTUREACCESS_STREAMING. - * \param rect A pointer to the rectangle to lock for access. If the rect + * \param rect A pointer to the rectangle to lock for access. If the rect * is NULL, the entire texture will be locked. - * \param pixels This is filled in with a pointer to the locked pixels, + * \param pixels This is filled in with a pointer to the locked pixels, * appropriately offset by the locked area. * \param pitch This is filled in with the pitch of the locked pixels. - * + * * \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING. - * + * * \sa SDL_UnlockTexture() */ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, @@ -395,7 +393,7 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, /** * \brief Unlock a texture, uploading the changes to video memory, if needed. - * + * * \sa SDL_LockTexture() */ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); @@ -446,7 +444,7 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer * If the output display is a window, mouse events in the window will be filtered * and scaled so they seem to arrive within the logical resolution. * - * \note If this function results in scaling or subpixel drawing by the + * \note If this function results in scaling or subpixel drawing by the * rendering backend, it will be handled using the appropriate * quality hints. * @@ -496,7 +494,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, /** * \brief Set the clip rectangle for the current target. - * + * * \param renderer The renderer for which clip rectangle should be set. * \param rect A pointer to the rectangle to set as the clip rectangle, or * NULL to disable clipping. @@ -510,7 +508,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, /** * \brief Get the clip rectangle for the current target. - * + * * \param renderer The renderer from which clip rectangle should be queried. * \param rect A pointer filled in with the current clip rectangle, or * an empty rectangle if clipping is disabled. @@ -531,7 +529,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer, * before they are used by the renderer. This allows resolution * independent drawing with a single coordinate system. * - * \note If this results in scaling or subpixel drawing by the + * \note If this results in scaling or subpixel drawing by the * rendering backend, it will be handled using the appropriate * quality hints. For best results use integer scaling factors. * @@ -555,14 +553,14 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, /** * \brief Set the color used for drawing operations (Rect, Line and Clear). - * + * * \param renderer The renderer for which drawing color should be set. * \param r The red value used to draw on the rendering target. * \param g The green value used to draw on the rendering target. * \param b The blue value used to draw on the rendering target. - * \param a The alpha value used to draw on the rendering target, usually + * \param a The alpha value used to draw on the rendering target, usually * ::SDL_ALPHA_OPAQUE (255). - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer, @@ -571,14 +569,14 @@ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer, /** * \brief Get the color used for drawing operations (Rect, Line and Clear). - * + * * \param renderer The renderer from which drawing color should be queried. * \param r A pointer to the red value used to draw on the rendering target. * \param g A pointer to the green value used to draw on the rendering target. * \param b A pointer to the blue value used to draw on the rendering target. - * \param a A pointer to the alpha value used to draw on the rendering target, + * \param a A pointer to the alpha value used to draw on the rendering target, * usually ::SDL_ALPHA_OPAQUE (255). - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer, @@ -587,15 +585,15 @@ extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer, /** * \brief Set the blend mode used for drawing operations (Fill and Line). - * + * * \param renderer The renderer for which blend mode should be set. * \param blendMode ::SDL_BlendMode to use for blending. - * + * * \return 0 on success, or -1 on error - * - * \note If the blend mode is not supported, the closest supported mode is + * + * \note If the blend mode is not supported, the closest supported mode is * chosen. - * + * * \sa SDL_GetRenderDrawBlendMode() */ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, @@ -603,12 +601,12 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, /** * \brief Get the blend mode used for drawing operations. - * + * * \param renderer The renderer from which blend mode should be queried. * \param blendMode A pointer filled in with the current blend mode. - * + * * \return 0 on success, or -1 on error - * + * * \sa SDL_SetRenderDrawBlendMode() */ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, @@ -625,11 +623,11 @@ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer); /** * \brief Draw a point on the current rendering target. - * + * * \param renderer The renderer which should draw a point. * \param x The x coordinate of the point. * \param y The y coordinate of the point. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, @@ -637,11 +635,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, /** * \brief Draw multiple points on the current rendering target. - * + * * \param renderer The renderer which should draw multiple points. * \param points The points to draw * \param count The number of points to draw - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, @@ -650,13 +648,13 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, /** * \brief Draw a line on the current rendering target. - * + * * \param renderer The renderer which should draw a line. * \param x1 The x coordinate of the start point. * \param y1 The y coordinate of the start point. * \param x2 The x coordinate of the end point. * \param y2 The y coordinate of the end point. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, @@ -664,11 +662,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, /** * \brief Draw a series of connected lines on the current rendering target. - * + * * \param renderer The renderer which should draw multiple lines. * \param points The points along the lines * \param count The number of points, drawing count-1 lines - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, @@ -677,10 +675,10 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, /** * \brief Draw a rectangle on the current rendering target. - * + * * \param renderer The renderer which should draw a rectangle. * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, @@ -688,11 +686,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, /** * \brief Draw some number of rectangles on the current rendering target. - * + * * \param renderer The renderer which should draw multiple rectangles. * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, @@ -701,11 +699,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, /** * \brief Fill a rectangle on the current rendering target with the drawing color. - * + * * \param renderer The renderer which should fill a rectangle. - * \param rect A pointer to the destination rectangle, or NULL for the entire + * \param rect A pointer to the destination rectangle, or NULL for the entire * rendering target. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, @@ -713,11 +711,11 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, /** * \brief Fill some number of rectangles on the current rendering target with the drawing color. - * + * * \param renderer The renderer which should fill multiple rectangles. * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, @@ -726,14 +724,14 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, /** * \brief Copy a portion of the texture to the current rendering target. - * + * * \param renderer The renderer which should copy parts of a texture. * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire + * \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 + * \param dstrect A pointer to the destination rectangle, or NULL for the * entire rendering target. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, @@ -742,7 +740,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, 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 + * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center * * \param renderer The renderer which should copy parts of a texture. * \param texture The source texture. @@ -753,7 +751,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, * \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 An SDL_RendererFlip 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, @@ -766,17 +764,17 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, /** * \brief Read pixels from the current rendering target. - * + * * \param renderer The renderer from which pixels should be read. - * \param rect A pointer to the rectangle to read, or NULL for the entire + * \param rect A pointer to the rectangle to read, or NULL for the entire * render target. * \param format The desired format of the pixel data, or 0 to use the format * of the rendering target * \param pixels A pointer to be filled in with the pixel data * \param pitch The pitch of the pixels parameter. - * + * * \return 0 on success, or -1 if pixel reading is not supported. - * + * * \warning This is a very slow operation, and should not be used frequently. */ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, @@ -791,7 +789,7 @@ extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer); /** * \brief Destroy the specified texture. - * + * * \sa SDL_CreateTexture() * \sa SDL_CreateTextureFromSurface() */ @@ -800,7 +798,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture); /** * \brief Destroy the rendering context for a window and free associated * textures. - * + * * \sa SDL_CreateRenderer() */ extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer); @@ -830,9 +828,7 @@ extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" |