Debian Codegraph @

src/effect/PixelTool.h

raw
1 #ifndef HEADER_PIXELTOOL_H
2 #define HEADER_PIXELTOOL_H
3
4 #include "SDL.h"
5
6 /**
7 * Pixel rutines.
8 */
9 class PixelTool {
10 public:
11 static bool colorEquals(const SDL_Color &color1,
12 const SDL_Color &color2);
13 static Uint32 convertColor(SDL_PixelFormat *format,
14 const SDL_Color &color);
15
16 static SDL_Color getColor(SDL_Surface *surface, int x, int y);
17 static void putColor(SDL_Surface *surface, int x, int y,
18 const SDL_Color &color);
19
20 static Uint32 getPixel(SDL_Surface *surface, int x, int y);
21 static void putPixel(SDL_Surface *surface, int x, int y, Uint32 pixel);
22
23 static Uint32 unpackPixel(Uint8 bpp, Uint8 *p);
24 static void packPixel(Uint8 bpp, Uint8 *p, Uint32 pixel);
25 };
26
27 #endif