Mercurial > sdl-ios-xcode
diff src/video/SDL_draw.h @ 3536:0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
SDL_BlendPoints()
SDL_BlendLines()
SDL_DrawLines()
SDL_FillRects()
SDL_BlendRects()
SDL_RenderPoints()
SDL_RenderLines()
SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 09 Dec 2009 15:56:56 +0000 |
parents | 9f2482d6662c |
children | b931bcfd94a0 |
line wrap: on
line diff
--- a/src/video/SDL_draw.h Mon Dec 07 10:08:24 2009 +0000 +++ b/src/video/SDL_draw.h Wed Dec 09 15:56:56 2009 +0000 @@ -346,11 +346,11 @@ #define FILLRECT(type, op) \ do { \ - int width = dstrect->w; \ - int height = dstrect->h; \ + int width = rect->w; \ + int height = rect->h; \ int pitch = (dst->pitch / dst->format->BytesPerPixel); \ int skip = pitch - width; \ - type *pixel = (type *)dst->pixels + dstrect->y * pitch + dstrect->x; \ + type *pixel = (type *)dst->pixels + rect->y * pitch + rect->x; \ while (height--) { \ { int n = (width+3)/4; \ switch (width & 3) { \