Added stubs for software implementations of blending fills and line drawing

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403350
This commit is contained in:
Sam Lantinga 2008-12-20 13:14:28 +00:00
parent 34bffd20f5
commit af67559465
8 changed files with 296 additions and 14 deletions

View file

@ -365,6 +365,23 @@ extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
(SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
/*
* This function draws a line with 'color'
* The color should be a pixel of the format used by the surface, and
* can be generated by the SDL_MapRGB() function.
* This function returns 0 on success, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_DrawLine
(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color);
/*
* This function blends an RGBA value along a line
* This function returns 0 on success, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_BlendLine
(SDL_Surface * dst, int x1, int y1, int x2, int y2, int blendMode,
Uint8 r, Uint8 g, Uint8 b, Uint8 a);
/*
* This function performs a fast fill of the given rectangle with 'color'
* The given rectangle is clipped to the destination surface clip area
@ -377,6 +394,17 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
extern DECLSPEC int SDLCALL SDL_FillRect
(SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
/*
* This function blends an RGBA value into the given rectangle.
* The given rectangle is clipped to the destination surface clip area
* and the final fill rectangle is saved in the passed in pointer.
* If 'dstrect' is NULL, the whole surface will be filled with 'color'
* This function returns 0 on success, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_BlendRect
(SDL_Surface * dst, SDL_Rect * dstrect, int blendMode, Uint8 r, Uint8 g,
Uint8 b, Uint8 a);
/*
* This performs a fast blit from the source surface to the destination
* surface. It assumes that the source and destination rectangles are