comparison include/SDL_surface.h @ 3593:b931bcfd94a0

In the process of adding rectangle drawing
author Sam Lantinga <slouken@libsdl.org>
date Fri, 18 Dec 2009 07:03:09 +0000
parents 5543db4239e6
children f638ded38b8a
comparison
equal deleted inserted replaced
3592:25dc4a86132c 3593:b931bcfd94a0
414 * 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
415 * can be generated by the SDL_MapRGB() function. 415 * can be generated by the SDL_MapRGB() function.
416 * 416 *
417 * \return 0 on success, or -1 on error. 417 * \return 0 on success, or -1 on error.
418 */ 418 */
419 extern DECLSPEC int SDLCALL SDL_BlendPoint 419 extern DECLSPEC int SDLCALL SDL_BlendDrawPoint
420 (SDL_Surface * dst, int x, int y, 420 (SDL_Surface * dst, int x, int y,
421 int blendMode, 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 422 extern DECLSPEC int SDLCALL SDL_BlendPoints
423 (SDL_Surface * dst, const SDL_Point * points, int count, 423 (SDL_Surface * dst, const SDL_Point * points, int count,
424 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 424 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
447 extern DECLSPEC int SDLCALL SDL_BlendLines 447 extern DECLSPEC int SDLCALL SDL_BlendLines
448 (SDL_Surface * dst, const SDL_Point * points, int count, 448 (SDL_Surface * dst, const SDL_Point * points, int count,
449 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 449 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
450 450
451 /** 451 /**
452 * Draws the given rectangle with \c color.
453 *
454 * If \c rect is NULL, the whole surface will be outlined with \c color.
455 *
456 * The color should be a pixel of the format used by the surface, and
457 * can be generated by the SDL_MapRGB() function.
458 *
459 * \return 0 on success, or -1 on error.
460 */
461 extern DECLSPEC int SDLCALL SDL_DrawRect
462 (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
463 extern DECLSPEC int SDLCALL SDL_DrawRects
464 (SDL_Surface * dst, const SDL_Rect ** rects, int count, Uint32 color);
465
466 /**
467 * Blends the given rectangle with \c color.
468 *
469 * If \c rect is NULL, the whole surface will have a blended outline of \c color.
470 *
471 * \return 0 on success, or -1 on error.
472 */
473 extern DECLSPEC int SDLCALL SDL_BlendRect
474 (SDL_Surface * dst, const SDL_Rect * rect,
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);
479
480 /**
452 * Performs a fast fill of the given rectangle with \c color. 481 * Performs a fast fill of the given rectangle with \c color.
453 * 482 *
454 * If \c rect is NULL, the whole surface will be filled with \c color. 483 * If \c rect is NULL, the whole surface will be filled with \c color.
455 * 484 *
456 * The color should be a pixel of the format used by the surface, and 485 * The color should be a pixel of the format used by the surface, and
464 (SDL_Surface * dst, const SDL_Rect ** rects, int count, Uint32 color); 493 (SDL_Surface * dst, const SDL_Rect ** rects, int count, Uint32 color);
465 494
466 /** 495 /**
467 * Blends an RGBA value into the given rectangle. 496 * Blends an RGBA value into the given rectangle.
468 * 497 *
469 * If \c rect is NULL, the whole surface will be filled with \c color. 498 * If \c rect is NULL, the whole surface will be blended with \c color.
470 * 499 *
471 * \return This function returns 0 on success, or -1 on error. 500 * \return This function returns 0 on success, or -1 on error.
472 */ 501 */
473 extern DECLSPEC int SDLCALL SDL_BlendRect 502 extern DECLSPEC int SDLCALL SDL_BlendFillRect
474 (SDL_Surface * dst, const SDL_Rect * rect, 503 (SDL_Surface * dst, const SDL_Rect * rect,
475 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 504 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
476 extern DECLSPEC int SDLCALL SDL_BlendRects 505 extern DECLSPEC int SDLCALL SDL_BlendFillRects
477 (SDL_Surface * dst, const SDL_Rect ** rects, int count, 506 (SDL_Surface * dst, const SDL_Rect ** rects, int count,
478 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 507 int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
479 508
480 /** 509 /**
481 * Performs a fast blit from the source surface to the destination surface. 510 * Performs a fast blit from the source surface to the destination surface.