/*
- * $Id$
- *
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
*
pDestSurf = pSurf ? &pSurf->SurfObj : NULL;
+ ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
+
rcDest.left = XDest;
rcDest.top = YDest;
if (bTransformCoordinates)
rcDest.top += pDC->ptlDCOrig.y;
rcDest.right = rcDest.left + Width;
rcDest.bottom = rcDest.top + Height;
+ rcDest.top += StartScan;
+
ptSource.x = XSrc;
ptSource.y = YSrc;
SourceSize.cx = bmi->bmiHeader.biWidth;
- SourceSize.cy = ScanLines; // this one --> abs(bmi->bmiHeader.biHeight) - StartScan
+ SourceSize.cy = ScanLines;
+
DIBWidth = DIB_GetDIBWidthBytes(SourceSize.cx, bmi->bmiHeader.biBitCount);
hSourceBitmap = EngCreateBitmap(SourceSize,
EXLATEOBJ_vInitialize(&exlo, ppalDIB, ppalDDB, 0, 0, 0);
/* Copy the bits */
+ DPRINT("BitsToDev with dstsurf=(%d|%d) (%d|%d), src=(%d|%d) w=%d h=%d\n",
+ rcDest.left, rcDest.top, rcDest.right, rcDest.bottom,
+ ptSource.x, ptSource.y, SourceSize.cx, SourceSize.cy);
Status = IntEngBitBlt(pDestSurf,
pSourceSurf,
NULL,
Exit:
if (NT_SUCCESS(Status))
{
- /* FIXME: Should probably be only the number of lines actually copied */
- ret = ScanLines; // this one --> abs(Info->bmiHeader.biHeight) - StartScan;
+ ret = ScanLines;
}
if (ppalDIB) PALETTE_UnlockPalette(ppalDIB);