shadowm

Untitled

Dec 22nd, 2013
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. void tcanvas::blit(surface& surf, SDL_Rect rect)
  2. {
  3.     draw();
  4.  
  5.     if(blur_depth_) {
  6.         if(is_neutral(surf)) {
  7.             blur_surface(surf, rect, blur_depth_);
  8.         } else {
  9.             // Can't directly blur the surface if not 32 bpp.
  10.             SDL_Rect r = rect;
  11.             ///@todo we should use: get_surface_portion(surf, r, false)
  12.             ///no need to optimize format, since blur_surface will undo it
  13.             surface s = get_surface_portion(surf, r, true);
  14.             s = blur_surface(s, blur_depth_);
  15.             sdl_blit(s, NULL, surf, &rect);
  16.         }
  17.     }
  18.  
  19.     sdl_blit(canvas_, NULL, surf, &rect);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment