|
|
Definition at line 283 of file dib32bpp.c.
{
LONG X, Y, SourceX, SourceY = 0, wd;
ULONG *DestBits, Source = 0;
LONG DstHeight;
LONG DstWidth;
LONG SrcHeight;
LONG SrcWidth;
DstHeight = DestRect->bottom - DestRect->top;
DstWidth = DestRect->right - DestRect->left;
SrcHeight = SourceRect->bottom - SourceRect->top;
SrcWidth = SourceRect->right - SourceRect->left;
DestBits = (ULONG*)((PBYTE)DestSurf->pvScan0 +
(DestRect->left << 2) +
DestRect->top * DestSurf->lDelta);
wd = DestSurf->lDelta - ((DestRect->right - DestRect->left) << 2);
for (Y = DestRect->top; Y < DestRect->bottom; Y++)
{
SourceY = SourceRect->top+(Y - DestRect->top) * SrcHeight / DstHeight;
for (X = DestRect->left; X < DestRect->right; X++, DestBits++)
{
SourceX = SourceRect->left+(X - DestRect->left) * SrcWidth / DstWidth;
if (SourceX >= 0 && SourceY >= 0 &&
SourceSurf->sizlBitmap.cx > SourceX && SourceSurf->sizlBitmap.cy > SourceY)
{
Source = DIB_GetSourceIndex(SourceSurf, SourceX, SourceY);
if (Source != iTransColor)
{
*DestBits = XLATEOBJ_iXlate(ColorTranslation, Source);
}
}
}
DestBits = (ULONG*)((ULONG_PTR)DestBits + wd);
}
return TRUE;
}
|