00001 #ifndef HEADER_OUTLINE_H
00002 #define HEADER_OUTLINE_H
00003
00004 #include "SDL.h"
00005
00006
00007
00008
00009
00010 class Outline {
00011 private:
00012 int m_width;
00013 SDL_Color m_color;
00014 Uint32 m_pixel;
00015 private:
00016 SDL_Surface *cloneSurface(SDL_Surface *surface);
00017 void precomputePixel(SDL_PixelFormat *format);
00018 void drawOneLayer(SDL_Surface *surface, Uint32 bgKey);
00019 void drawAlongCopy(SDL_Surface *surface, Uint32 bgKey,
00020 SDL_Surface *copy);
00021 void fillNeighbourhood(SDL_Surface *surface, Uint32 bgKey,
00022 int x, int y);
00023 public:
00024 Outline(const SDL_Color &color, int width);
00025 void drawOnColorKey(SDL_Surface *surface);
00026 void drawOn(SDL_Surface *surface, Uint32 bgKey);
00027 };
00028
00029 #endif