Mercurial > sdl-ios-xcode
diff src/video/SDL_draw.h @ 2901:133601e3b255
Added RenderPiont() API
Merged the drawing tests into a single test program
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 21 Dec 2008 17:39:41 +0000 |
parents | 3a9636c83849 |
children | e426c4fc9cf7 |
line wrap: on
line diff
--- a/src/video/SDL_draw.h Sun Dec 21 08:59:56 2008 +0000 +++ b/src/video/SDL_draw.h Sun Dec 21 17:39:41 2008 +0000 @@ -29,6 +29,13 @@ #define DRAW_MUL(_a, _b) (((unsigned)(_a)*(_b))/255) +#define DRAW_FASTSETPIXEL(x, y, type, bpp, color) \ + *(type *)(dst->pixels + y * dst->pitch + x * bpp) = (type) color + +#define DRAW_FASTSETPIXEL1(x, y) DRAW_FASTSETPIXEL(x, y, Uint8, 1, color); +#define DRAW_FASTSETPIXEL2(x, y) DRAW_FASTSETPIXEL(x, y, Uint16, 2, color); +#define DRAW_FASTSETPIXEL4(x, y) DRAW_FASTSETPIXEL(x, y, Uint32, 4, color); + #define DRAW_SETPIXEL(setpixel) \ do { \ unsigned sr = r, sg = g, sb = b, sa = a; \