bool LKSurface::Copy(int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, const LKSurface& Surface, int nXOriginSrc, int nYOriginSrc) { #ifdef USE_GDI return ::BitBlt(*this, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, Surface, nXOriginSrc, nYOriginSrc, SRCCOPY); #else if(_pCanvas && Surface.IsDefined()) { _pCanvas->Copy(nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, Surface, nXOriginSrc, nYOriginSrc); return true; } return false; #endif }
bool LKSurface::TransparentCopy(int xoriginDest, int yoriginDest, int wDest, int hDest, const LKSurface& Surface, int xoriginSrc, int yoriginSrc) { #ifdef USE_GDI #ifdef UNDER_CE return ::TransparentImage(*this, xoriginDest, yoriginDest, wDest, hDest, Surface, xoriginSrc, yoriginSrc, wDest, hDest, COLOR_WHITE); #else return ::TransparentBlt(*this, xoriginDest, yoriginDest, wDest, hDest, Surface, xoriginSrc, yoriginSrc, wDest, hDest, COLOR_WHITE); #endif #else if(_pCanvas && Surface.IsDefined()) { _pCanvas->CopyTransparentWhite(xoriginDest, yoriginDest, wDest, hDest, Surface, xoriginSrc, yoriginSrc); return true; } return false; #endif }
void LKBitmapSurface::CopyTo(LKSurface &other) { assert(this != &other); #ifdef USE_GDI other.Copy(0,0, _Size.cx, _Size.cy, *this, 0, 0); #else if(IsDefined() && other.IsDefined()) { #if defined(ENABLE_OPENGL) static_cast<BufferCanvas*>(_pCanvas)->CopyTo(other); #else Canvas& dst = other; dst.Copy(*_pCanvas); #endif } #endif }