include/SDL_surface.h
changeset 2888 32e8bbba1e94
parent 2859 99210400e8b9
child 2901 133601e3b255
equal deleted inserted replaced
2887:f8c0c5ef6d54 2888:32e8bbba1e94
   364  */
   364  */
   365 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
   365 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
   366     (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
   366     (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
   367 
   367 
   368 /*
   368 /*
       
   369  * This function draws a line with 'color'
       
   370  * The color should be a pixel of the format used by the surface, and 
       
   371  * can be generated by the SDL_MapRGB() function.
       
   372  * This function returns 0 on success, or -1 on error.
       
   373  */
       
   374 extern DECLSPEC int SDLCALL SDL_DrawLine
       
   375     (SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color);
       
   376 
       
   377 /*
       
   378  * This function blends an RGBA value along a line
       
   379  * This function returns 0 on success, or -1 on error.
       
   380  */
       
   381 extern DECLSPEC int SDLCALL SDL_BlendLine
       
   382     (SDL_Surface * dst, int x1, int y1, int x2, int y2, int blendMode,
       
   383      Uint8 r, Uint8 g, Uint8 b, Uint8 a);
       
   384 
       
   385 /*
   369  * This function performs a fast fill of the given rectangle with 'color'
   386  * This function performs a fast fill of the given rectangle with 'color'
   370  * The given rectangle is clipped to the destination surface clip area
   387  * The given rectangle is clipped to the destination surface clip area
   371  * and the final fill rectangle is saved in the passed in pointer.
   388  * and the final fill rectangle is saved in the passed in pointer.
   372  * If 'dstrect' is NULL, the whole surface will be filled with 'color'
   389  * If 'dstrect' is NULL, the whole surface will be filled with 'color'
   373  * The color should be a pixel of the format used by the surface, and 
   390  * The color should be a pixel of the format used by the surface, and 
   374  * can be generated by the SDL_MapRGB() function.
   391  * can be generated by the SDL_MapRGB() function.
   375  * This function returns 0 on success, or -1 on error.
   392  * This function returns 0 on success, or -1 on error.
   376  */
   393  */
   377 extern DECLSPEC int SDLCALL SDL_FillRect
   394 extern DECLSPEC int SDLCALL SDL_FillRect
   378     (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
   395     (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
       
   396 
       
   397 /*
       
   398  * This function blends an RGBA value into the given rectangle.
       
   399  * The given rectangle is clipped to the destination surface clip area
       
   400  * and the final fill rectangle is saved in the passed in pointer.
       
   401  * If 'dstrect' is NULL, the whole surface will be filled with 'color'
       
   402  * This function returns 0 on success, or -1 on error.
       
   403  */
       
   404 extern DECLSPEC int SDLCALL SDL_BlendRect
       
   405     (SDL_Surface * dst, SDL_Rect * dstrect, int blendMode, Uint8 r, Uint8 g,
       
   406      Uint8 b, Uint8 a);
   379 
   407 
   380 /*
   408 /*
   381  * This performs a fast blit from the source surface to the destination
   409  * This performs a fast blit from the source surface to the destination
   382  * surface.  It assumes that the source and destination rectangles are
   410  * surface.  It assumes that the source and destination rectangles are
   383  * the same size.  If either 'srcrect' or 'dstrect' are NULL, the entire
   411  * the same size.  If either 'srcrect' or 'dstrect' are NULL, the entire