include/SDL_surface.h
changeset 3536 0267b8b1595c
parent 3434 147d6ef5be03
child 3550 6b69c5def097
equal deleted inserted replaced
3535:b403f790df65 3536:0267b8b1595c
   403  *  
   403  *  
   404  *  \return 0 on success, or -1 on error.
   404  *  \return 0 on success, or -1 on error.
   405  */
   405  */
   406 extern DECLSPEC int SDLCALL SDL_DrawPoint
   406 extern DECLSPEC int SDLCALL SDL_DrawPoint
   407     (SDL_Surface * dst, int x, int y, Uint32 color);
   407     (SDL_Surface * dst, int x, int y, Uint32 color);
       
   408 extern DECLSPEC int SDLCALL SDL_DrawPoints
       
   409     (SDL_Surface * dst, const SDL_Point * points, int count, Uint32 color);
   408 
   410 
   409 /**
   411 /**
   410  *  Blends a point with an RGBA value.
   412  *  Blends a point with an RGBA value.
   411  *  
   413  *  
   412  *  The color should be a pixel of the format used by the surface, and 
   414  *  The color should be a pixel of the format used by the surface, and 
   413  *  can be generated by the SDL_MapRGB() function.
   415  *  can be generated by the SDL_MapRGB() function.
   414  *  
   416  *  
   415  *  \return 0 on success, or -1 on error.
   417  *  \return 0 on success, or -1 on error.
   416  */
   418  */
   417 extern DECLSPEC int SDLCALL SDL_BlendPoint
   419 extern DECLSPEC int SDLCALL SDL_BlendPoint
   418     (SDL_Surface * dst, int x, int y, int blendMode,
   420     (SDL_Surface * dst, int x, int y,
   419      Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   421      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
       
   422 extern DECLSPEC int SDLCALL SDL_BlendPoints
       
   423     (SDL_Surface * dst, const SDL_Point * points, int count,
       
   424      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   420 
   425 
   421 /**
   426 /**
   422  *  Draws a line with \c color.
   427  *  Draws a line with \c color.
   423  *  
   428  *  
   424  *  The color should be a pixel of the format used by the surface, and 
   429  *  The color should be a pixel of the format used by the surface, and 
   426  *  
   431  *  
   427  *  \return 0 on success, or -1 on error.
   432  *  \return 0 on success, or -1 on error.
   428  */
   433  */
   429 extern DECLSPEC int SDLCALL SDL_DrawLine
   434 extern DECLSPEC int SDLCALL SDL_DrawLine
   430     (SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color);
   435     (SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color);
       
   436 extern DECLSPEC int SDLCALL SDL_DrawLines
       
   437     (SDL_Surface * dst, const SDL_Point * points, int count, Uint32 color);
   431 
   438 
   432 /**
   439 /**
   433  *  Blends an RGBA value along a line.
   440  *  Blends an RGBA value along a line.
   434  *  
   441  *  
   435  *  \return 0 on success, or -1 on error.
   442  *  \return 0 on success, or -1 on error.
   436  */
   443  */
   437 extern DECLSPEC int SDLCALL SDL_BlendLine
   444 extern DECLSPEC int SDLCALL SDL_BlendLine
   438     (SDL_Surface * dst, int x1, int y1, int x2, int y2, int blendMode,
   445     (SDL_Surface * dst, int x1, int y1, int x2, int y2,
   439      Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   446      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
       
   447 extern DECLSPEC int SDLCALL SDL_BlendLines
       
   448     (SDL_Surface * dst, const SDL_Point * points, int count,
       
   449      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   440 
   450 
   441 /**
   451 /**
   442  *  Performs a fast fill of the given rectangle with \c color.
   452  *  Performs a fast fill of the given rectangle with \c color.
   443  *  
   453  *  
   444  *  The given rectangle is clipped to the destination surface clip area
   454  *  If \c rect is NULL, the whole surface will be filled with \c color.
   445  *  and the final fill rectangle is saved in the passed in pointer.
       
   446  *  
       
   447  *  If \c dstrect is NULL, the whole surface will be filled with \c color.
       
   448  *  
   455  *  
   449  *  The color should be a pixel of the format used by the surface, and 
   456  *  The color should be a pixel of the format used by the surface, and 
   450  *  can be generated by the SDL_MapRGB() function.
   457  *  can be generated by the SDL_MapRGB() function.
   451  *  
   458  *  
   452  *  \return 0 on success, or -1 on error.
   459  *  \return 0 on success, or -1 on error.
   453  */
   460  */
   454 extern DECLSPEC int SDLCALL SDL_FillRect
   461 extern DECLSPEC int SDLCALL SDL_FillRect
   455     (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
   462     (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
       
   463 extern DECLSPEC int SDLCALL SDL_FillRects
       
   464     (SDL_Surface * dst, const SDL_Rect ** rects, int count, Uint32 color);
   456 
   465 
   457 /**
   466 /**
   458  *  Blends an RGBA value into the given rectangle.
   467  *  Blends an RGBA value into the given rectangle.
   459  *  
   468  *  
   460  *  The given rectangle is clipped to the destination surface clip area
   469  *  If \c rect is NULL, the whole surface will be filled with \c color.
   461  *  and the final fill rectangle is saved in the passed in pointer.
       
   462  *  
       
   463  *  If \c dstrect is NULL, the whole surface will be filled with \c color.
       
   464  *  
   470  *  
   465  *  \return This function returns 0 on success, or -1 on error.
   471  *  \return This function returns 0 on success, or -1 on error.
   466  */
   472  */
   467 extern DECLSPEC int SDLCALL SDL_BlendRect
   473 extern DECLSPEC int SDLCALL SDL_BlendRect
   468     (SDL_Surface * dst, SDL_Rect * dstrect, int blendMode, Uint8 r, Uint8 g,
   474     (SDL_Surface * dst, const SDL_Rect * rect,
   469      Uint8 b, Uint8 a);
   475      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
       
   476 extern DECLSPEC int SDLCALL SDL_BlendRects
       
   477     (SDL_Surface * dst, const SDL_Rect ** rects, int count,
       
   478      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   470 
   479 
   471 /**
   480 /**
   472  *  Performs a fast blit from the source surface to the destination surface.
   481  *  Performs a fast blit from the source surface to the destination surface.
   473  *  
   482  *  
   474  *  This assumes that the source and destination rectangles are
   483  *  This assumes that the source and destination rectangles are