home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 275 / DPCS0111DVD.ISO / Toolkit / Audio-Visual / VirtualDub / Source / VirtualDub-1.9.10-src.7z / src / Kasumi / source / blt_uberblit.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2009-09-14  |  454 b   |  20 lines

  1. #include <vd2/system/vdalloc.h>
  2. #include <vd2/Kasumi/pixmap.h>
  3. #include "uberblit.h"
  4.  
  5. void VDPixmapBlt_UberblitAdapter(const VDPixmap& dst, const VDPixmap& src, vdpixsize w, vdpixsize h) {
  6.     vdautoptr<IVDPixmapBlitter> blitter(VDPixmapCreateBlitter(dst, src));
  7.  
  8.     if (w > src.w)
  9.         w = src.w;
  10.     if (w > dst.w)
  11.         w = dst.w;
  12.     if (h > src.h)
  13.         h = src.h;
  14.     if (h > dst.h)
  15.         h = dst.h;
  16.  
  17.     vdrect32 r(0, 0, w, h);
  18.     blitter->Blit(dst, &r, src);
  19. }
  20.