mirror of
https://github.com/yawut/SDL.git
synced 2026-08-24 01:35:39 -05:00
Added stubs for software implementations of blending fills and line drawing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user