Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void tcanvas::blit(surface& surf, SDL_Rect rect)
- {
- draw();
- if(blur_depth_) {
- if(is_neutral(surf)) {
- blur_surface(surf, rect, blur_depth_);
- } else {
- // Can't directly blur the surface if not 32 bpp.
- SDL_Rect r = rect;
- ///@todo we should use: get_surface_portion(surf, r, false)
- ///no need to optimize format, since blur_surface will undo it
- surface s = get_surface_portion(surf, r, true);
- s = blur_surface(s, blur_depth_);
- sdl_blit(s, NULL, surf, &rect);
- }
- }
- sdl_blit(canvas_, NULL, surf, &rect);
- }
Advertisement
Add Comment
Please, Sign In to add comment