00001 #ifndef HEADER_PIXELTOOL_H
00002 #define HEADER_PIXELTOOL_H
00003
00004 #include "SDL.h"
00005
00006
00007
00008
00009 class PixelTool {
00010 public:
00011 static bool colorEquals(const SDL_Color &color1,
00012 const SDL_Color &color2);
00013 static Uint32 convertColor(SDL_PixelFormat *format,
00014 const SDL_Color &color);
00015
00016 static SDL_Color getColor(SDL_Surface *surface, int x, int y);
00017 static void putColor(SDL_Surface *surface, int x, int y,
00018 const SDL_Color &color);
00019
00020 static Uint32 getPixel(SDL_Surface *surface, int x, int y);
00021 static void putPixel(SDL_Surface *surface, int x, int y, Uint32 pixel);
00022
00023 static Uint32 unpackPixel(Uint8 bpp, Uint8 *p);
00024 static void packPixel(Uint8 bpp, Uint8 *p, Uint32 pixel);
00025 };
00026
00027 #endif