Image::copySurface added
This commit is contained in:
parent
db9e1b29d9
commit
6b380ae5e7
|
@ -16,4 +16,16 @@ namespace Image
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDL_Surface *copySurface(SDL_Surface *s)
|
||||||
|
{
|
||||||
|
SDL_Surface *copy = SDL_CreateRGBSurface(SDL_SWSURFACE, s->w, s->h,
|
||||||
|
s->format->BitsPerPixel,
|
||||||
|
s->format->Rmask, s->format->Gmask,
|
||||||
|
s->format->Bmask, s->format->Amask);
|
||||||
|
SDL_BlitSurface(s, NULL, copy, NULL);
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace Image
|
||||||
{
|
{
|
||||||
|
|
||||||
void threshold(SDL_Surface *image, int lowerBound, int upperBound);
|
void threshold(SDL_Surface *image, int lowerBound, int upperBound);
|
||||||
|
SDL_Surface *copySurface(SDL_Surface *s);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ifndef _IMAGE_H_ */
|
#endif /* ifndef _IMAGE_H_ */
|
||||||
|
|
Reference in New Issue