diff include/SDL_surface.h @ 3596:f638ded38b8a

Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color. Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine(). Added API for rectangle drawing (as opposed to filling) Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay. Optimized software line drawing quite a bit. Added support for Wu's anti-aliased line drawing, currently disabled by default.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 23 Dec 2009 01:55:00 +0000
parents b931bcfd94a0
children f7b03b6838cb
line wrap: on
line diff
--- a/include/SDL_surface.h	Fri Dec 18 08:19:18 2009 +0000
+++ b/include/SDL_surface.h	Wed Dec 23 01:55:00 2009 +0000
@@ -411,12 +411,9 @@
 /**
  *  Blends a point with an RGBA value.
  *  
- *  The color should be a pixel of the format used by the surface, and 
- *  can be generated by the SDL_MapRGB() function.
- *  
  *  \return 0 on success, or -1 on error.
  */
-extern DECLSPEC int SDLCALL SDL_BlendDrawPoint
+extern DECLSPEC int SDLCALL SDL_BlendPoint
     (SDL_Surface * dst, int x, int y,
      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
 extern DECLSPEC int SDLCALL SDL_BlendPoints
@@ -464,9 +461,9 @@
     (SDL_Surface * dst, const SDL_Rect ** rects, int count, Uint32 color);
 
 /**
- *  Blends the given rectangle with \c color.
+ *  Blends an RGBA value into the outline of the given rectangle.
  *  
- *  If \c rect is NULL, the whole surface will have a blended outline of \c color.
+ *  If \c rect is NULL, the whole surface will have a blended outline.
  *  
  *  \return 0 on success, or -1 on error.
  */
@@ -495,7 +492,7 @@
 /**
  *  Blends an RGBA value into the given rectangle.
  *  
- *  If \c rect is NULL, the whole surface will be blended with \c color.
+ *  If \c rect is NULL, the whole surface will be blended with the color.
  *  
  *  \return This function returns 0 on success, or -1 on error.
  */
@@ -506,6 +503,88 @@
     (SDL_Surface * dst, const SDL_Rect ** rects, int count,
      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
 
+#if 0
+/**
+ *  Draws the given circle with \c color.
+ *  
+ *  The color should be a pixel of the format used by the surface, and 
+ *  can be generated by the SDL_MapRGB() function.
+ *  
+ *  \return 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_DrawCircle
+    (SDL_Surface * dst, int x, int y, int radius, Uint32 color);
+
+/**
+ *  Blends an RGBA value into the outline of the given circle.
+ *  
+ *  \return 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_BlendCircle
+    (SDL_Surface * dst, int x, int y, int radius,
+     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+
+/**
+ *  Fills the given circle with \c color.
+ *  
+ *  The color should be a pixel of the format used by the surface, and 
+ *  can be generated by the SDL_MapRGB() function.
+ *  
+ *  \return 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_FillCircle
+    (SDL_Surface * dst, int x, int y, int radius, Uint32 color);
+
+/**
+ *  Blends an RGBA value into the given circle.
+ *  
+ *  \return This function returns 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_BlendFillCircle
+    (SDL_Surface * dst, int x, int y, int radius,
+     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+
+/**
+ *  Draws the given ellipse with \c color.
+ *  
+ *  The color should be a pixel of the format used by the surface, and 
+ *  can be generated by the SDL_MapRGB() function.
+ *  
+ *  \return 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_DrawEllipse
+    (SDL_Surface * dst, int x, int y, int w, int h, Uint32 color);
+
+/**
+ *  Blends an RGBA value into the outline of the given ellipse.
+ *  
+ *  \return 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_BlendEllipse
+    (SDL_Surface * dst, int x, int y, int w, int h,
+     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+
+/**
+ *  Fills the given ellipse with \c color.
+ *  
+ *  The color should be a pixel of the format used by the surface, and 
+ *  can be generated by the SDL_MapRGB() function.
+ *  
+ *  \return 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_FillEllipse
+    (SDL_Surface * dst, int x, int y, int w, int h, Uint32 color);
+
+/**
+ *  Blends an RGBA value into the given ellipse.
+ *  
+ *  \return This function returns 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_BlendFillEllipse
+    (SDL_Surface * dst, int x, int y, int w, int h,
+     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+#endif // 0
+
 /**
  *  Performs a fast blit from the source surface to the destination surface.
  *