-@@ -217,23 +216,55 @@
- delete surfacepartrequest;
- }
-
-+namespace
-+{
-+ void fillrect(SDL_Surface* screen, float x, float y, float w, float h, int r, int g, int b, int a)
-+ {
-+ if(w < 0) {
-+ x += w;
-+ w = -w;
-+ }
-+ if(h < 0) {
-+ y += h;
-+ h = -h;
-+ }
-+
-+ SDL_Rect src, rect;
-+ SDL_Surface *temp = NULL;
-+
-+ rect.x = (int)x;
-+ rect.y = (int)y;
-+ rect.w = (int)w;
-+ rect.h = (int)h;
-+
-+ if(a != 255) {
-+ temp = SDL_CreateRGBSurface(screen->flags, rect.w, rect.h, screen->format->BitsPerPixel, screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask);
-+
-+ src.x = 0;
-+ src.y = 0;
-+ src.w = rect.w;
-+ src.h = rect.h;
-+
-+ SDL_FillRect(temp, &src, SDL_MapRGB(screen->format, r, g, b));
-+ SDL_SetAlpha(temp, SDL_SRCALPHA, a);
-+ SDL_BlitSurface(temp,0,screen,&rect);
-+ SDL_FreeSurface(temp);
-+ } else {
-+ SDL_FillRect(screen, &rect, SDL_MapRGB(screen->format, r, g, b));
-+ }
-+ }
-+}
-+
- void
- DrawingContext::draw_gradient(DrawingRequest& request)
- {